關於shell指令碼提示No such file or directory的解決辦法和原因
在執行剛編寫完的shell指令碼時,報錯
現象:
解決辦法:
vim模式開啟這個shell指令碼,檢視編碼格式後設置成unix編碼
具體操作:
vim shellarr.sh開啟指令碼,ctrl+c進入輸入:命令的格式,輸入:set ff?,檢視格式是否是fileformat=unix
如果不是,設定成unix
:set ff=unix後儲存(:wq)即可。
原因:檔案格式不正確導致,檔案是DOS格式。使用:set ff=unix 強制將檔案轉換為unix格式。
相關推薦
關於shell指令碼提示No such file or directory的解決辦法和原因
在執行剛編寫完的shell指令碼時,報錯現象:解決辦法: vim模式開啟這個shell指令碼,檢視編碼格式後設置成unix編碼 具體操作: vim shellarr.sh開啟指令碼,ctrl+c進入輸入:命令的格式,輸入:set ff?,檢視格
Linux中提示No such file or directory解決方法
問題描述 解決方法 分析原因,可能因為我平臺遷移碰到許可權問題我們來進行許可權轉換 1)在Windows下轉換: 利用一些編輯器如UltraEdit或EditPlus等工具先將指令碼編碼轉換,再放到Linux中執行。轉換方式如下(UltraEdit):File
在Linux中提示No such file or directory解決方法
編寫shell指令碼執行一些命令發現很多的地方出現了問題,總是No such file or directory。但是事實上是有的,在網上查找了一些觀點,總結一下: (1)在Windows下轉換: 利用一些編輯器如Notepat++,UltraEdit或Edit
ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory 解決辦法
object init ror 文件 module libmysql 找到 str 軟連接 >>> import MySQLdbTraceback (most recent call last): File "<stdin>", line
PyCharm ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory 解決辦法
圖片 object shared 8.0 body har error err cto PyCharm ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or d
gcc編譯報錯 checking whether the C compiler works... no 中的 error trying to exec 'cc1': execvp: No such file or directory解決辦法
1 首先檢查報錯原因是execvp: No such file or directory 因此要將/etc/profile的export PATH指向gcc的lib路徑中的cc1檔案 例如我的cc1檔案在/usr/lib64/gcc/x86_64-suse-linux/4.8/ 則輸出 export P
-bash: sbin/lua: No such file or directory解決辦法
說明 有時候,可執行檔案Lua 明視訊記憶體在,執行時會提示-bash: sbin/lua: No such file or directory。首先想到的應該是依賴的動態連結庫缺少。 原因 首先檢視lua所依賴的動態連結庫有哪些 $ ldd sbin/lu
Linux: find命令 ‘/proc/xxxx/task/xxxx/fd/y’: No such file or directory 解決辦法
問題描述: find命令查詢系統中大於50M的檔案時,有幾行報錯: No such file or directory [email protected]:~# find / -size +50M /proc/kcorefind: ‘/proc/6377/task
fatal error: alsa/asoundlib.h: No such file or directory 解決辦法
最近在ROS裡編譯呼叫了科大訊飛SDK的語音包,編譯時報了錯誤 fatal error: alsa/asoundlib.h: No such file or directory, 找不到asoundlib.h檔案,解決辦法如下,直接apt安裝那個庫就行了 sudo a
/usr/bin/env: bash: No such file or directory 解決辦法
The problem's cause was that Git on Windows converted the line endings of gradlew from Unix style (LF) to Windows style (CRLF). You can t
ltdl.h: No such file or directory解決辦法
簡介 系統沒有安裝libltdl開發庫 解決方法 如果在ubunt作業系統中,只需安裝: apt install libltdl3-dev 如果在centos作業系統中,只需安裝: yum
Linux執行指令碼命令提示No such file or directory錯誤的解決辦法
首先了解下基礎知識: python指令碼中的#!/usr/bin/python 估計有不少人注意過一些python指令碼開頭有這麼行東東: #!/usr/bin/python 它是用來幹嘛的?貌似沒有它對指令碼功能也沒啥影響。它是用來指定用什麼直譯器執行指令
linux執行python的指令碼檔案,提示提示No such file or directory
在window平臺下,寫好python指令碼檔案,遷移到linux平臺,賦過可執行許可權,執行該sh檔案,卻提示No such file or directory。ls 了下,確實有該檔案,怎麼會事呢
Linux執行指令碼卻提示No such file or directory
確認可執行許可權 使用 chmod a+x xxx.filename.ext 檢查檔案系統格式 vim xxx.filename.ext 輸入: set ff=unix 儲存退出 現在應該可執行了,原先的set ff結果為fileformat = dos 檔案由wind
Linux執行.sh文件,提示No such file or directory的問題的解決方法
感謝 文件格式 很多 兼容 dir shell nbsp www window平臺 Linux執行.sh文件,提示No such file or directory的問題在window平臺下,寫好shell腳本文件,遷移到linux平臺,賦過可執行權限,執行該sh文件,卻提
centos systemctl daemon-reload 提示 no such file or directory 的一個原因
emc systemctl system directory srvice 成了 UC service srv service 的文件名寫錯了 比如 mongodb.service 寫成了 mongodb.srvice 真的是坑,居然沒有提示具體的路徑,只是提示一
關於Linux下文件刪除文件時提示No such file or directory
tor move tmp args 指點 刪除 遇到 fin 請問 尊敬的各位老大: 本人了Linux小白一枚,遇到一點問題想請老大們指點一下今天練習tar命令壓縮文件時想給給文件名內增加一個當前年月日 [root@poker log]# tar zcvf log.tar-
Linux執行.sh檔案,提示No such file or directory的問題的解決方法
今天遇到了個奇怪的問題,就是再linux中執行shell 死活載入不到/etc/profile 直接執行source /etc/profile 沒問題 但是在shell中執行就不行 查詢
Linux執行可執行檔案提示No such file or directory的解決方法
最近在使用Linux作業系統執行一個可執行檔案,結果出現了No such file or directory的提示,表示很疑惑。 ./tshrf bash: ./tshref: No such file or directory 檢視檔案資訊,可以看到
解決“執行arm-linux-gcc命令,提示No such file or directory”的問題
今天在ubuntu14.04上安裝arm的交叉編譯器arm-linux-gcc,環境變數配置好以後,執行arm-linux-gcc命令,總提示No such file or directory。然後去arm-linux-gcc所在的目錄下,發現不缺少任何檔案。而且環境變數配