加载/home/[User]/.profile时发现错误

syn*_*rge 5 boot error-handling

我昨晚安装了 homebrew,以便能够在 Ubuntu 20.4 上安装 wtfutil 终端。我确实成功了,后来决定卸载它。

看起来它卸载得很好,但留下了一些我不明白的错误。我是 Ubuntu/Linux 新手,所以这给我带来了很多麻烦,因为输入密码后我无法访问我的桌面。

这是完整的错误:

Error found when loading /home/[user]/.profile

/home/[user]/.profile: line 28: /home/linuxbrew/.linuxbrew/bin/brew: No such file or directory 

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.
Run Code Online (Sandbox Code Playgroud)

小智 4

我遇到了完全相同的问题,这非常有用,来自 synacticgeorge 的评论就是解决方案。

  • 重启
  • 在登录屏幕上,按 CTRL+ALT+F3 并在 TTY 中登录
  • nano .profile (或 vi、gedit,等等)
  • 拆下有问题的酿造线。
  • 利润


小智 -3

您可能复制了安装说明并将自制程序添加到您的路径中。如果您从 /home/user/.profile 中删除对自制程序的引用,它应该可以再次工作

输入终端 rm -rf /home/[user]/.profile

  • 这真是个糟糕的建议。您是否意识到在默认系统上删除 ~/.profile 也会禁用 .bashrc 的加载? (4认同)