Linux執行.sh文件,提示No such file or directory的問題的解決方法
Linux執行.sh文件,提示No such file or directory的問題
在window平臺下,寫好shell腳本文件,遷移到linux平臺,賦過可執行權限,執行該sh文件,
卻提示No such file or directory。ls 了下,確實有該文件,怎麽會事呢,
難道是文件格式兼容性問題?用vim打開該sh文件,輸入:
[plain]
:set ff
回車,顯示fileformat=dos,重新設置下文件格式:
[plain]
:set ff=unix
保存退出:
[plain]
:wq
再執行,竟然可以了。這個事情又給我提了次醒,程序盡量在linux下編寫,遷移時,也許會少很多問題。
轉自https://www.kafan.cn/edu/9850424.html
感謝大神
Linux執行.sh文件,提示No such file or directory的問題的解決方法
相關推薦
Linux執行.sh文件,提示No such file or directory的問題的解決方法
感謝 文件格式 很多 兼容 dir shell nbsp www window平臺 Linux執行.sh文件,提示No such file or directory的問題在window平臺下,寫好shell腳本文件,遷移到linux平臺,賦過可執行權限,執行該sh文件,卻提
Linux執行.sh檔案,提示No such file or directory的問題的解決方法
今天遇到了個奇怪的問題,就是再linux中執行shell 死活載入不到/etc/profile 直接執行source /etc/profile 沒問題 但是在shell中執行就不行 查詢
Linux執行.sh檔案,提示No such file or directory錯誤
當你把startofbiz.sh用編輯器如記事本開啟後,修改一下再儲存,放回原來的路徑下,然後啟動就會報錯:No such file or directory . 原因是你開啟檔案是在windows環境下,儲存後CR/LF(回車/換行)與linux下不同。所以格式不同會報錯
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
bash: ./arm-none-linux-gnueabi-gcc: No such file or directory解決方法
2016年08月30日 14:56:14 simonli1121 閱讀數:3727更多 個人分類: linux 轉自:http://blog.csdn.net/mr_define/article/details/51059329 http:
bin/sh^M: bad interpreter: No such file or directory解決(轉載)
原帖子 問題:bin/sh^M: bad interpreter: No such file or directory 原因:.sh指令碼在windows系統下用記事本檔案編寫的。不同系統的編碼格式引起的。 解決方法:修改.sh檔案格式 (1)使用vi工
配置caffe的python環境時make pycaffe提示fatal error: numpy/arrayobject.h No such file or directory解決方法
重灌numpy: sudo pip uninstall numpy sudo pip install numpy 是沒有用的。。。 解決的辦法就是: sudo apt-get install python-numpy (adsbygoogle = window.adsbygoogl
bin sh^M bad interpreter No such file or directory 解決
編寫了shell指令碼後,執行時有時會出現: ^M bad interpreter No such file or directory 的報錯,本文提供瞭解決方案 原因 Shell指令碼在windo
linux下/dev/dsp:No such file or directory解決方法
寫了一個需要通過dsp進行音訊操作的小程式,執行時卻提示/dev/dsp:No such file or directory $ls /dev目錄下並沒有dsp這個檔案解決方法很簡單: $sud
Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2002] No such file or directory解決方法
mouse 正是 from key int stripe 進程 成功 stack 今天用pdo連接mysql遇到一個奇怪的問題,host設為127.0.0.1可以連接成功,設為localhost就會報如下的錯誤: PHP Fatal error: Uncaught ex
numa.h:No such file or directory 解決方法
解決 clas issues -o log 方法 -s body num 參考: numa.h:No such file or directory numa.h:No such file or directory 解決方法 Ubuntu: $ apt-get install
Ubuntu下 fatal error: Python.h: No such file or directory 解決方法
error ID apt overflow AC python3 TE cto fat 參考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such f
nginx 啟動報錯“var/run/nginx/nginx.pid" no such file or directory解決方法
今天剛搭建的nginx伺服器啟動時,報錯“var/run/nginx/nginx.pid" no such file or directory,按照他的意思我在var/run/新建了一個資料夾nginx,重新啟動,啟動成功。 但是當我虛擬機
Debian下Cannot set LC_CTYPE to default locale: No such file or directory解決方法
把語言環境變數改為英文 將Ubuntu系統語言環境改為英文的en_US.UTF-8 檢視當前系統語言環境 locale 編輯配置檔案。將zh_US.UTF-8改為en_US.UTF-8。zh改為en sudo nano /etc/default/locale
nginx 啟動報錯“var/run/nginx/nginx.pid" no such file or directory解決方法
今天剛搭建的nginx伺服器啟動時,報錯“var/run/nginx/nginx.pid" no such file or directory,按照他的意思我在var/run/新建了一個資料夾nginx,重新啟動,啟動成功。 但是當我虛擬機器重啟後依然報錯“
Redis安裝報錯error:jemalloc/jemalloc.h:No such file or directory解決方法
安裝Redis 在安裝Redis之前,需要安裝Redis的依賴程式tcl,如果不安裝tcl在Redis執行make test的時候就會報錯的哦。 $ yum install -y tcl $ tar xvf 3.2.0.tar.gz -C /usr/loc
No such file or directory: 解決方法
剛剛編譯時突然報紅No such file or directory: '/Users...,在專案裡搜對應檔案發現它就靜靜的在那,沒有任何異常,解決方法:刪掉TARGETS - Build Phases - Compile Sources 裡白框的檔案
mingw下用gcc編譯c檔案出現no such file or directory解決方法
c檔案直接拖進cmd時地址是對的,但gcc不認空格,所以要把路徑當做所有空格都去掉或改成“—”,這樣它就能直接發現檔案了,這時在cmd中編寫:gcc F:\new.c -o F:\new.exe ,就會出現new.e
錯誤:QMainWindow: No such file or directory 解決方法
C++ GUI Qt4程式設計第二版的原始碼,在Qt5下編譯,出現如下錯誤: "#include <QtWidgets> No such file or directory", 解決