【linux錯誤】Ubuntu says “bash: XXXXX Permission denied”

今天安裝Anaconda,下載好的Anaconda3-2018.12-Linux-x86_64.sh
,在執行./Anaconda3-2018.12-Linux-x86_64.sh時終端提示出現錯誤:

bash: ./Anaconda3-2018.12-Linux-x86_64.sh: Permission denied

原因:剛下載好的文件沒有執行權限
解決方法:

chmod u+x program_name. 

然後盤它!

完整答案:
https://stackoverflow.com/questions/18960689/ubuntu-says-bash-program-permission-denied

另外 chmod u+xchmod +x的區別:
chmod的手冊頁對此進行了介紹:
u stands for user.
g stands for group.
o stands for others.
a stands for all.
這意味着chmod u+x somefile只授予該文件執行權限的所有者,而chmod +x somefile與chmod a+x somefile相同。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章