Ubuntu中的No such file or dictionary

這一次我在安裝vmwaretools的過程中碰到了這種坑,把我坑的不輕,因此記錄下來希望讀者若有相同情況以此爲誡。


首先出現No such file or dictionary這種報錯提示時我們應該分析這種提示前面的一句話:例如輸入:


cd file:///home/seconp/Desktop


我碰到的報錯提示是:


bash: cd: file:///home/seconp/Desktop: No such file or directory


中文:進入子程序:cd(命令符):文件路徑:沒有相應的文件或者目錄


我真的是無語了,明明是存在的,爲什麼會報這種錯呢?好的讓我們來了換種方式去試一下。


/home/seconp/Desktop


這樣就成功地進入了文件夾,好吧。。。。。爲神魔呢?


來看看官方解釋的  /home/*  :
About the home directory:


You can have as many /home/username directories as you have users.


Each user has full read/write/execute access to his or her /home/username directory.


Each user can make their /home/username directory unreadable by other users.
Each user can fully customize their Desktop layout/background, sounds, window manager, applications, etc.
The home directory is:
Where your Desktop resides.


Where your documents, pictures, music, videos, audio, and pretty much everything else can be stored.
Where your application settings are stored, in hidden files and directories (their names start with a . ) that you should not touch unless you know what you are doing. Eg, /home/username/.thunderbird contains your Thunderbird emails and contacts, /home/username/.mozilla contains Firefox bookmarks, passwords, history, plugins…
The only place (with the exclusion of removable drives and the /tmp directory) within the Ubuntu file system where a user can freely create/modify/remove files and directories without needing root permissions or the sudo command.


寫了一大堆,反正翻譯翻譯就那麼回事兒吧。


但是file:///home是一個域名,知道了嗎?一個是鏈接,一個是路徑,當然不同了,所以在終端輸入cd file:///home/seconp/Desktop時會出現錯誤。


上面不是說了出現出現No such file or dictionary這種報錯提示時我們應該分析這種提示前面的一句話嗎?好的,我們再舉一個例子。此時,在安裝vmware時錯誤提示爲:


bash: .vmware-install.pl: /usr/bin/perl: bad interpreter: No such file or directory


中文:進入子程序:vmware-install.pl:/usr/bin/perl:壞的解釋器:沒有相應的文件或者目錄


這種情況發生了你就需要看看perl壞在哪了。或者說是你就沒有安裝perl,那就安裝一個perl就行了。







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章