簡體   English   中英

每次打開終端時,$ PATH錯誤

[英]$PATH error every time Terminal is Opened

我現在每次通過App Cleaner卸載終端之前和之后都安裝了Postgres.app ,現在每次打開終端時,此錯誤都會出現在第一行中,我應該提一下,后面是什么文檔,用於在其網站上卸載Postgres,但對我不起作用。

Warning: $PATH entry "/Applications/Postgres.app/Contents/Versions/9.6/bin" is not valid (No such file or directory)

.bash_profile文件:

# source ~/.profile

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*


export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="/usr/local/opt/node@6/bin:$PATH"

我如何擺脫這個煩人的警告? 謝謝。

您應該查看所有bash初始化文件。 可能有很多,具體取決於您的發行版。 tldp上有一個不錯的清單:

  • /etc/bash.bashrc
  • /etc/profile
  • /etc/bashrc
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile
  • ~/.bashrc

考慮到這些文件中的某些文件可能還包括某個目錄中的所有文件。 例如,在大多數情況下, /etc/profile將運行/etc/profile.d/每個.sh文件,其中可能包含一個名為/etc/profile.d/extrapaths.sh的路徑文件。

編輯:

檢查PostgresApp文檔(后12 ),這個問題我發現,它使用一個名為/etc/paths.d/postgresapp 一定要檢查一下。

如果您想刪除路徑,它指出您應該運行以下命令:

sudo rm /etc/paths.d/postgresapp

暫無
暫無

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

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