簡體   English   中英

在 Linux 上安裝 Rust 失敗並出現錯誤“OS 21”

[英]Rust installation fails on Linux with error "OS 21"

當我嘗試在我的 Linux 機器上安裝 Rust 時,出現了這個錯誤:
error: could not amend shell profile: '/home/$Username/.profile': could not write rcfile file: '/home/$Username/.profile': Is a directory (os error 21)

許多類 unix 系統使用~/.profile文件作為放置用戶會話啟動代碼的點。 還有其他具有類似功能的文件。 您不應將該文件用於任何其他目的(例如,它是一個目錄)。

您的安裝腳本顯然想向該文件添加一些內容。 這並不罕見,因為~/.profile可用於設置程序的搜索路徑。

您應該重命名(或刪除) ~/.profile目錄。

我不得不刪除我的 .profile 文件夾。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM