2023/02/27
[macOS] PHP 7.4 在 Homebrew 近期更新升版後發生 Library not loaded 錯誤
markdown
### 問題
在月初更新了 PHP 的版本,而最新版本來到了 PHP 8.2。近期開發的專案都以 PHP 8.1 為主,也並未發現異常。剛好最近在修改舊專案,是跑在 PHP 7.4 的版本,這時才發現無法正常運作。
2023/02/05
[Mac] 解決更新 macOS 後,在 Terminal 執行 command 時出現 xcrun 錯誤訊息
markdown
### 問題
今天在更新 macOS 後, 在終端機執行 command 時出現 xcrun 錯誤。
訊息如下:
```
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
```
### 解決方法
重新安裝 Xcode Command Line Tools 即可
```
xcode-select --install
```
2020/08/23
[macOS] Mac 解決 gyp: No Xcode or CLT version detected! 的問題
markdown
### 環境
- macOS Catalina 版本 10.15.6
- Node v14.5.0
- npm v6.14.5
### 問題
最近換新電腦,在開新專案執行 npm install 時出現下列訊息
```
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
```
### 解決方法
參考此文:[Installation notes for macOS Catalina (v10.15)](https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md)
```
sudo rm -rf $(xcode-select -print-path)
```
執行過程它會重新安裝 command line tools
完成安裝後就行了
參考連結中還有其他指令,但我僅執行這行就成功了,若有朋友也遇到相同問題,可以參考接下來的動作
```
xcode-select --install
```
2016/11/23
[Homebrew] 如何在 Mac 切換 Node 版本
Node 的版本更新得很頻繁,不知不覺已來到 7.1.x 版了
原本還持續使用 v6.9.1 (Node 6 LTS) 的版本
只因為更新 Yarn, 它自動幫我升級 Node 到 7.1
但,這個更新,造成有些前端使用 glup 搭配 sass 的套件失靈
當下立刻聯想是 Node 升級的原因
既然都更新 Node 到最新版本了,而且要更新 Yarn 又需要 Node 7 的版本,只好找找是否有切換的方法
果然,我也不是單一的受害者,有網友也遇到相同的情況
原本還持續使用 v6.9.1 (Node 6 LTS) 的版本
只因為更新 Yarn, 它自動幫我升級 Node 到 7.1
但,這個更新,造成有些前端使用 glup 搭配 sass 的套件失靈
當下立刻聯想是 Node 升級的原因
既然都更新 Node 到最新版本了,而且要更新 Yarn 又需要 Node 7 的版本,只好找找是否有切換的方法
果然,我也不是單一的受害者,有網友也遇到相同的情況
2016/11/18
2016/09/21
訂閱:
文章 (Atom)




