首页 > 其他 > 详细

sudo: unable to execute ./script.sh: no such file or directory

时间:2016-01-30 09:32:51      阅读:1398      评论:0      收藏:0      [点我收藏+]

I just had this exact problem, it turned out to be a text file encoding problem. For me to fix it while running Xubuntu 14.04.3 LTS, I installed dos2unix and converted the script‘s encoding and then ran the script again using sudo and it worked fine. You can find an example below:

sudo apt-get install dos2unix -y
dos2unix test.sh
sudo chmod u+x test.sh && sudo ./test.sh

参考:http://unix.stackexchange.com/questions/144718/sudo-unable-to-execute-script-sh-no-such-file-or-directory

sudo: unable to execute ./script.sh: no such file or directory

原文:http://www.cnblogs.com/wawahaha/p/5170445.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!