sudo: unable to execute ./script.sh: no such file or directory
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的更多相关文章
- CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
今天尝试更新了下虚拟机CentOS中的python版本后. 运行“yum”命令,就报错:“sudo: unable to execute /bin/yum: No such file or direc ...
- sudo: unable to execute ./xxx.py: no such file or directory
$ ./mk_dataset.py -bash: ./mk_dataset.py: /home/ocean1101/anaconda3/bin/python^M: bad interpreter: N ...
- android中:/system/bin/sh: : No such file or directory错误
将一个raspberry下编译好的可执行文件放在android的system/bin下,修改为777权限,运行,出现下面的错误: /system/bin/sh: XXX: No such file o ...
- Flutter /bin/sh: /packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
自己写项目中遇到的一个问题, 可以出来是路径找不到,应该是FLUTTER_ROOT这个全局变量没有取到值的原因 1.检查xcode_backend.sh 是否真的存在 2.网上说的:Target -& ...
- Pyinstaller 打包exe 报错 "failed to execute script XXX"的一种解决方案
最近用PyQt5写了一个界面小程序,需要打包成exe给到其他windows上使用,一开始使用python 3.7 64位,用pyinstaller打包exe,在64位机上运行正常. 但是目标电脑是32 ...
- Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ...
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define ... 这个错误是因为有两个相 ...
- 导入项目时,有关[2016-04-03 20:38:02 - Dex Loader] Unable to execute dex: Multiple dex files 问题
最近我在学习androidUI设计,在网上找了一个UI菜单界面开源代码示例,按照步骤导入项目,运行的时候控制台结果报了如下错误: [2016-04-03 20:38:02 - Dex Loader] ...
- Unable to execute dex: GC overhead limit exceeded
Android打包时下面的错误: Unable to execute dex: GC overhead limit exceeded GC overhead limit exceeded 解决的方法: ...
- Eclipse下Android开发错误之Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace
升级了Android版本后,在运行应用时提示: [2013-11-27 10:37:35 - Dex Loader] Unable to execute dex: java.nio.BufferOve ...
随机推荐
- Linux学习笔记10
创建文件 touch touch filenames 创建文件夹 mkdir mkdir dir3 dir4 dir5 建立多个文件夹 mkdir ~/games 在登录用户的本目录之下建立game ...
- C#数组和集合整理
写起来还是有些勉强的,还有很多用法没有完全理解,只整理了一些基本点. Array ArrayList List Hashtable Dictionary Stack Queue Array 也就是数组 ...
- YOLO系列:YOLO v1深度解析
声明一点,我是工程应用人员,此文章仅适合算法应用工程师. 1.首先 先看一下YOLO的整体结构: 2.其次 看一下YOLO的工作过程: (1) 将原图划分为SxS的网格.如果一个目标的中心落入某个格子 ...
- 虚拟机中操作系统的克隆方法及ip修改及硬件地址修改
1.把复制的操作系统关机 2.点击右键->管理->克隆->下一步->虚拟机当前状态->创建完整虚拟机->修改虚拟机名称 位置 3.修改主机名 4.修改主机名与ip ...
- [linux]服务器apache配置vhost
官网示例: http://httpd.apache.org/docs/current/vhosts/examples.html
- vs code配置c/c++调试环境+mingw+win10
参考博客:https://blog.csdn.net/bat67/article/details/76095813 下载VScode和mingw和环境变量的配置 请参考上述的博客 附上我的task.j ...
- emacs 入门教程,菜单汉化,配置文件等杂乱文章
首先来一发ArchWiki的Emacs简体中文的入门教程 https://wiki.archlinux.org/index.php/Emacs_(%E7%AE%80%E4%BD%93%E4%B8%AD ...
- Redis设计与实现:读书笔记之二
1.数据库 Redis服务器一般包含多个db,默认16个. 切换数据库 每个redis客户端都有自己的目标数据库,默认为0,可以通过select 1,切换数据库. 设置键的生存周期和过期时间 PTTL ...
- word2vec skip-gram系列2
Word2Vec的CBOW模型和Skip-gram模型 故事先从NNLM模型说起,网络结构图如下图所示,接下来先具体阐述下这个网络, 输入是个one-hot representation的向量.比如你 ...
- 卷积cnn总结
阅读了很多篇文章后,还是觉得有两篇文章很好,所以基本上就吸收搬过来了. 从神经网络到卷积神经网络(CNN) 我们知道神经网络的结构是这样的: 那卷积神经网络跟它是什么关系呢? 其实卷积神经网络依旧是层 ...