今天安装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+x
与chmod +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相同。