1. 程式人生 > >Linux中提示No such file or directory解決方法

Linux中提示No such file or directory解決方法

問題描述

解決方法

分析原因,可能因為我平臺遷移碰到許可權問題我們來進行許可權轉換

1)在Windows下轉換:

利用一些編輯器如UltraEdit或EditPlus等工具先將指令碼編碼轉換,再放到Linux中執行。轉換方式如下(UltraEdit):File-->Conversions-->DOS->UNIX即可。

2)方法

用vim開啟該sh檔案,輸入:

[plain]

:set ff  

回車,顯示fileformat=dos,重新設定下檔案格式:

[plain]

:set ff=unix  

儲存退出:

[plain]

:wq  

再執行,竟然可以了

3)在linux中的許可權轉換

也可在Linux中轉換:

首先要確保檔案有可執行許可權

#chmod u+x filename

然後修改檔案格式

#vi filename

三種方法都可以方便快速的解決關於Linux執行.sh檔案,提示No such file or directory這個問題了。

相關推薦

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:

配置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

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", 解決

tar (child): bzip2: Cannot exec: No such file or directory 解決方法

今天用tar命令解壓檔案的時候出錯了,資訊如下: tar (child): bzip2: Cannot exec: No such file or directory tar (child): Error is not recoverable: exiting now tar: Ch

xcode修改程式碼目錄結構出現clang: error: no such file or directory 解決方法

需要遷移一個開源工程的一部分內容到自己工程,遷移對方的工程到自己工程之後,因目錄結構配置整理需要,對嵌入的工程目錄進行了結構改變,編譯後出現: clang: error: no such file or directory:  '/Users/username/Deskto

[Android] 單獨編譯生成boot.img時mkbootfs: No such file or directory解決方法

在一臺沒有安裝Android原始碼編譯環境的64位 Ubuntu14.04.5虛擬機器上嘗試單獨編譯Android用的Linux Kernel。並從編譯好Android原始碼的機器上將out資料夾下的mkbootfs、minigzip、mkbootimg二進位制

Linux執行.sh文件,提示No such file or directory的問題的解決方法

感謝 文件格式 很多 兼容 dir shell nbsp www window平臺 Linux執行.sh文件,提示No such file or directory的問題在window平臺下,寫好shell腳本文件,遷移到linux平臺,賦過可執行權限,執行該sh文件,卻提

關於Linux下文件刪除文件時提示No such file or directory

tor move tmp args 指點 刪除 遇到 fin 請問 尊敬的各位老大: 本人了Linux小白一枚,遇到一點問題想請老大們指點一下今天練習tar命令壓縮文件時想給給文件名內增加一個當前年月日 [root@poker log]# tar zcvf log.tar-