国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

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

這篇具有很好參考價值的文章主要介紹了Linux中提示No such file or directory解決方法。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

說明:
在linux下,./xxx.sh執(zhí)行shell腳本時會提示No such file or directory。但shell明明存在,為什么就是會提示這個呢?

Linux中提示No such file or directory解決方法,linux,運維,服務(wù)器


這種其實是因為編碼方式不對,如你在win下編輯sh,然后直接復制到linux下面

實現(xiàn):
有2種方法可以解決這個。
1)在Windows下轉(zhuǎn)換:
利用一些編輯器如UltraEdit或EditPlus等工具先將腳本編碼轉(zhuǎn)換,再放到Linux中執(zhí)行。轉(zhuǎn)換方式如下(UltraEdit):File–>Conversions–>DOS->UNIX即可。

2)用vim打開該sh文件,輸入:
:set ff //回車,顯示fileformat=dos
:set ff=unix //重新設(shè)置下文件格式
:wq //保存退出
再執(zhí)行,就不會再提示No such file or directory這個問題了。文章來源地址http://www.zghlxwxcb.cn/news/detail-628367.html

到了這里,關(guān)于Linux中提示No such file or directory解決方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔相關(guān)法律責任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費用

相關(guān)文章

  • Python獲取文件提示找不到指定路徑,提示can‘t open file ‘a(chǎn)rea.py‘: [Errno 2] No such file or directory(超詳細解決)

    Python獲取文件提示找不到指定路徑,提示can‘t open file ‘a(chǎn)rea.py‘: [Errno 2] No such file or directory(超詳細解決)

    今天想在cmd命令窗口中運行文件中的代碼,結(jié)果發(fā)生了一些小錯誤。Python獲取文件提示找不到指定路徑,提示can\\\'t open file \\\'area.py\\\': [Errno 2] No such file or directory,可能出現(xiàn)了以下幾個問題。 (1)打開或?qū)氲奈募淮嬖?,一般來說在打開這個文件之前都會去文件夾里看一下這個

    2024年02月11日
    瀏覽(26)
  • 【解決方法】libGL.so.1: cannot open shared object file: No such file or directory

    在配云端GPU服務(wù)器時,出現(xiàn)這個錯誤 解決方法 安裝這個庫即可 親測有效 在Stack Overflow上有其他回答,當我試了無效 這邊也提供給大家 1、在docker中出錯 將以下行添加到您的 Dockerfile: 這些命令安裝通常存在于本地計算機上的 cv2 依賴項,但可能會在您的 Docker 容器中丟失,

    2024年01月17日
    瀏覽(18)
  • fatal error: linux/compiler-gcc9.h: No such file or directory

    fatal error: linux/compiler-gcc9.h: No such file or directory

    linux 找到README文件 mzh@DESKTOP-GITL67P:~$ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. ?There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ? 因為當前gcc版本是9.x, 找不到 compiler-gcc

    2024年02月09日
    瀏覽(23)
  • linux 寫c, 編譯報錯 stdio.h: No such file or directory,compilation terminated.

    linux 寫c, 編譯報錯 stdio.h: No such file or directory,compilation terminated.

    環(huán)境: windows11-subsystem(Ubuntu20) 問題: linux 寫c, 編譯報錯如圖(fatal error: stdio.h: No such file or directory │compilation terminated. #include stdio.h) 復現(xiàn): 問題原因: 默認操作系統(tǒng)安裝的gcc版本不對,和軟硬件不兼容 解決方案 卸載默認gcc: build-essential: 它包含了 GNU 編輯器集合,GNU 調(diào)試器,和

    2024年02月13日
    瀏覽(19)
  • 【OpenCV4】fatal error: opencv2/core.hpp: No such file or directory 解決方法

    【OpenCV4】fatal error: opencv2/core.hpp: No such file or directory 解決方法

    Mac 系統(tǒng) VScode OpenCV 4.5.4 在運行代碼的時候出現(xiàn)報錯 檢查 c_cpp_properties.json , launch.json , tasks.json 這 3 個文件,參考: https://blog.csdn.net/qq_42067550/article/details/122634801?spm=1001.2014.3001.5502 查看 pkg-config 的設(shè)置 檢查 vscode 工作區(qū)設(shè)置 在終端輸入: 的到: 隨便打開一個 訪達 窗口,

    2023年04月08日
    瀏覽(22)
  • linux 通過docker進行build編譯nginx時現(xiàn)./configure報-bash: ./configure: No such file or directory

    我們前端程序是通過nginx代理的,我們前后端都是通過docker來管理的 今天要將前端包和 nginx實例話的,在我的dockerFile文件里面有一個命令,就是將一個nginx.tar.gz包復制到/usr/local目錄下然后解壓,這個nginx.tar.gz里面包含了這個。/configure文件,結(jié)果在執(zhí)行一個編譯命令的時候報

    2024年02月07日
    瀏覽(24)
  • Linux中執(zhí)行bash腳本報錯/bin/bash^M: bad interpreter: No such file or directory

    Linux中執(zhí)行bash腳本報錯/bin/bash^M: bad interpreter: No such file or directory

    運行bash腳本會出現(xiàn)兩個文件, 1037.err 和 1037.out 。 1037.err的文件內(nèi)容如下: /data/home/user12/.lsbatch/1694577957.1037: /data/home/user12/.lsbatch/1694577957.1037.shell: /bin/sh^M: bad interpreter: No such file or directory 第一步 執(zhí)行命令行:cat -A xxx.sh 第二步 使用下述命令直接替換結(jié)尾符為unix格式 命令行

    2024年02月07日
    瀏覽(90)
  • 解決“VS 報No such file or directory“問題

    解決“VS 報No such file or directory“問題

    ? ? 今天在使用VS2015的calcOne工程,將工程由Debug版本改為Release版本,編譯時彈出\\\"無法打開包括文件: “addFunc.h”: No such file or directory\\\"錯誤,如圖(1)所示: 圖(1) Release版本報\\\"No such file or directory\\\"錯誤 ? ? 但是,將工程由Release版本改回到Debug版本,卻編譯成功。從而判斷是

    2023年04月11日
    瀏覽(29)
  • Gitee Clone:No such file or directory問題解決

    Gitee Clone:No such file or directory問題解決

    使用TortoiseGit ssh克隆gitee倉庫報以下錯: 第一步,檢查SSH公鑰是否配置成功,配置方法參考官方SSH 公鑰設(shè)置教程 第二步,使用Git Bash(使用Windows PowerShell或者CMD會出現(xiàn)亂碼)測試SSH配置成功 成功會有以下提示: 第三步,更換SSH Client 使用TortoiseGit克隆時,如果到這一步還克隆失

    2024年02月03日
    瀏覽(23)
  • dockerfile ENTRYPOINT 執(zhí)行.sh腳本提示找不到文件或文件不存在 No such file or directory

    我這里記錄的是我遇到的一種特殊情況,如果你也遇到了這個問題,且都試了在百度中找到的解決方法還沒有解決可以看看是不是和我遇到的問題一樣。 在Dockerfile中,我ADD了兩個文件,一個是jar包,一個是一個執(zhí)行jar包的.sh文件 但是在使用命令: 就會提示 /bin/sh: 0: cannot

    2024年01月21日
    瀏覽(27)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包