AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1250421
Accepted
binaryProgrammer
binaryProgrammer
Asked: 2020-06-15 18:50:33 +0800 CST2020-06-15 18:50:33 +0800 CST 2020-06-15 18:50:33 +0800 CST

找不到命令“abc”...每次我通过 SSH 连接到服务器时安装的每个命令

  • 772

每次与 SSH 断开连接时,我都必须重新安装每个程序。有人可以向我解释我做错了什么吗?Linux 新手,如果你能用简短的语言解释一下,那将是一个巨大的帮助。

我将这些行输入到终端:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
brew update

注销服务器并重新登录,相同的终端会话

brew update

我得到错误:找不到命令'brew'

这是完整的终端会话:

user@laptop:~$ ssh -p port# user@ServerAddress
user@ServerAddress's password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-37-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon 15 Jun 2020 03:04:03 AM UTC

  System load:  0.02               Temperature:           60.0 C
  Usage of /:   3.7% of 195.13GB   Processes:             196
  Memory usage: 2%                 Users logged in:       1
  Swap usage:   0%                 IPv4 address for eno1: ServerAddress

 * MicroK8s gets a native Windows installer and command-line integration.

     https://ubuntu.com/blog/microk8s-installers-windows-and-macos

0 updates can be installed immediately.
0 of these updates are security updates.


Last login: Mon Jun 15 02:18:15 2020 from Address
user@server:~$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/linuxbrew/.linuxbrew/Homebrew
==> The following existing directories will be made writable by user only:
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions

Press RETURN to continue or any other key to abort
[sudo] password for user: 
==> /usr/bin/sudo /bin/chmod u+rwx /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chmod 755 /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> Downloading and installing Homebrew...
HEAD is now at 0125c4cd5 Merge pull request #7740 from vidusheeamoli/add-tapioca
Already up-to-date.
Warning: /home/linuxbrew/.linuxbrew/bin is not in your PATH.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (or will be during this `install` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run `brew help` to get started
- Further documentation: 
    https://docs.brew.sh
- Install the Homebrew dependencies if you have sudo access:
  Debian, Ubuntu, etc.
    sudo apt-get install build-essential
  Fedora, Red Hat, CentOS, etc.
    sudo yum groupinstall 'Development Tools'
  See https://docs.brew.sh/linux for more information.
- Configure Homebrew in your /home/user/.profile by running
    echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> /home/user/.profile
- Add Homebrew to your PATH
    eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
- We recommend that you install GCC by running:
    brew install gcc

user@server:~$ eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
user@server:~$ brew update
Already up-to-date.
user@server:~$ exit
logout
Connection to ServerAddress closed.
user@laptop:~$ ssh -p port# user@ServerAddress
user@ServerAddress's password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-37-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Mon 15 Jun 2020 03:12:51 AM UTC

  System load:  0.05               Temperature:           57.0 C
  Usage of /:   3.7% of 195.13GB   Processes:             191
  Memory usage: 2%                 Users logged in:       1
  Swap usage:   0%                 IPv4 address for eno1: ServerAddress

 * MicroK8s gets a native Windows installer and command-line integration.

     https://ubuntu.com/blog/microk8s-installers-windows-and-macos

0 updates can be installed immediately.
0 of these updates are security updates.


Last login: Mon Jun 15 03:04:03 2020 from Address
user@server:~$ brew update

Command 'brew' not found, did you mean:

  command 'brec' from deb bplay (0.991-10build1)
  command 'qbrew' from deb qbrew (0.4.1-8build1)

Try: sudo apt install <deb name>

user@server:~$ 

可能相关的随机事实:

  • 第三次安装 Ubuntu 20.04 LTS,每个问题都相同(我花了一些时间来隔离这个问题)
  • OS安装过程中只选择安装openSSH

谢谢阅读。

software-installation command-line 20.04
  • 1 1 个回答
  • 1031 Views

1 个回答

  • Voted
  1. Best Answer
    EchoMike444
    2020-06-15T19:30:25+08:002020-06-15T19:30:25+08:00

    该命令eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) 必须在.bashrc最后添加到您的文件中。

    通过添加此命令,它将修改您的 PATH 变量。

    这样命令之后brew就可以使用了。

    • 3

相关问题

  • 如何在 Vim 中启用全彩支持?

  • 设置 LAMP 堆栈的最简单方法是什么?

  • 我应该在哪里安装 sagemath?

  • How do I install Adobe Flash player?对于 11.10 及更高版本明确修复 11.10 上的 64 位 Flash

  • 如何设置软件中心为非 root 用户安装软件?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve