今天設定環境變量,輸入以下指令:
sudo export PATH="$PATH:路徑“ (路徑為arm-linux-gcc的bin目錄)
結果提示:
sudo:export: command not found
在網上搜了一下,網友給出了答案。原理是export不能和sudo一起用。export修改的環境變量隻能是在目前使用者下有效。
是以改為以下指令可以執行成功,直接輸出以下指令:
export PATH="$PATH:路徑“
今天設定環境變量,輸入以下指令:
sudo export PATH="$PATH:路徑“ (路徑為arm-linux-gcc的bin目錄)
結果提示:
sudo:export: command not found
在網上搜了一下,網友給出了答案。原理是export不能和sudo一起用。export修改的環境變量隻能是在目前使用者下有效。
是以改為以下指令可以執行成功,直接輸出以下指令:
export PATH="$PATH:路徑“