-
Recent Posts
Recent Comments
Categories
Links
Monthly Archives: May 2019
turn on NTFS case sensitive on Win10
NTFS下的檔案名稱是case sensitive,但是如果兩個檔案的檔名差異只有大小寫則需要用底層的api呼叫來處理。但在win10可以透過把linux subsystem打開,在powershell下輸入 Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 並且針對資料夾設定 C:\Windows\System32\fsutil.exe file SetCaseSensitiveInfo D:\xxx\yyyy
Posted in System Administration
Leave a comment
exec path on linux
在處理nodejs addon時 手動執行node-gyp rebuild,js require編譯出來的.node檔時一直報錯 這個錯誤代表編譯與執行的nodejs版本不合 檢查在linux上執行命令的路徑 which node-gyp /usr/local/bin/node-gyp 執行whereis node-gyp 看是否有其他的node-gyp 直接執行 which 所回報的node-gyp路徑是正確的版本 /usr/local/bin/node-gyp rebuild (這個是對應執行環境的nodejs /usr/local/bin/node) 但事實上 直接執行node-gyp 執行的路徑卻是/usr/bin/node-gyp $PATH所顯示的也是先找 /usr/local/bin 後來發現是bash的hash cache造成的 type node-gyp 只要執行hash -d node-gyp 即可清掉 重新執行 node-gyp rebuild 就會對應正確的路徑 其他如hash -r 可參考
Posted in System Administration
Leave a comment