1. 在命令行下无法使用ll命令

  需要设置命令的别名。 文件位置:~/.bash_profile

source ~/.profile
export PATH="/usr/local/opt/php@7.2/bin:$PATH"
export PATH="/usr/local/opt/php@7.2/sbin:$PATH"
export PATH="usr/local/opt/mysql@5.7/bin:$PATH"

alias readlink=greadlink
alias ll='ls -alF'

  保存重新加载配置:  source ./bash_profile

  但有时会出现无法找到.profile文件的情况,需要编辑.bash_profile

export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

export PATH="/usr/local/opt/php@7.2/bin:$PATH"
export PATH="/usr/local/opt/php@7.2/sbin:$PATH"
export PATH="usr/local/opt/mysql@5.7/bin:$PATH"

alias readlink=greadlink
alias ll='ls -alF'

  重新加载配置即可

 

2. 系统升级之后,报错

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    解决方式:

重装Xcode

xcode-select --install

不成功,则执行下面命令:
sudo xcode-select -switch /

 

3. 运行命令brew install node,结果界面一直卡在Updating Homebrew...上

vim ~/.bash_profile

# 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true

source ~/.bash_profile

 

相关文章:

  • 2022-12-23
  • 2021-11-08
  • 2022-01-09
  • 2022-02-12
  • 2021-10-14
  • 2021-10-15
  • 2021-04-26
  • 2022-03-02
猜你喜欢
  • 2021-12-30
  • 2021-12-16
  • 2021-07-09
  • 2021-11-29
  • 2021-05-04
  • 2021-11-14
相关资源
相似解决方案