我可以在Ubuntu上使用Homebrew吗? [英] Can I use Homebrew on Ubuntu?

查看:169
本文介绍了我可以在Ubuntu上使用Homebrew吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试使用Homebrew和Linuxbrew在Ubuntu Server上安装软件包,但是都失败了.这是我尝试安装它们的方式:

I just tried to use Homebrew and Linuxbrew to install packages on my Ubuntu Server but both failed. This is how I tried to install them:

sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"

我收到以下警告:

Warning: /home/tong/.linuxbrew/bin is not in your PATH.

我在home/etc中运行我的bash.bashrc并添加以下内容:

I vi my bash.bashrc in home/etc and add this:

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

然后我尝试了brew doctor,但得到了No command 'brew' found.如何在Ubuntu上使用Homebrew?

Then I tried brew doctor but got No command 'brew' found. How am I able to use Homebrew on Ubuntu?

推荐答案

我只是尝试使用ruby命令安装它,但是以某种方式无法解决依赖关系,因此brew无法完全安装.但是,请尝试通过克隆进行安装:

I just tried installing it using the ruby command but somehow the dependencies are not resolved hence brew does not completely install. But, try installing by cloning:

git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew

,然后将以下内容添加到您的.bash_profile:

and then add the following to your .bash_profile:

export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"

应该可以.

这篇关于我可以在Ubuntu上使用Homebrew吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆