MAC下產生sudo:command not found

是由於環境變量設置錯誤mysql

 1.在命令行中輸入:sql

  export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/binbash

 能夠實現暫時的使用。命令行

 2.輸入cd ~/ #進入當前用戶的home目錄code

 3.建立bash_profile 執行命令:io

  touch .bash_profileast

 4.打開並編輯bash_profile執行命令:class

  open .bash_profile變量

 5.這樣就打開了一個筆記本,會顯示已經配置過的path,修改記事本,先所有刪除,有用的能夠備份,命令行解決後再加配置

  export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"

  PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"

  export PATH=$Path:/usr/local/mysql/bin

 6.保存,command + s

 7.在此命令行輸入更新命令

  source .bash_profile

 8.而後輸入 sudo spctl --master-disable

 

#轉自知乎Bleet

相關文章
相關標籤/搜索