我正在尝试按照此视频下载基于文本的浏览器电子链接https://www.youtube.com/watch?v=A2gzn8QAlWA但我不能,因为终端给了我错误“sudo:apt-get:找不到命令”。我应该怎么做才能解决这个问题,以便我可以下载 elinks?我使用
Mac OS X 版本 10.11.5。
这是我尝试使用brew安装后的控制台:
Last login: Thu Jul 7 12:32:57 on ttys000
➜ ~ sudo apt-get install elinks
Password:
sudo: apt-get: command not found
➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
The current contents of /usr/local are bin Cellar CODEOFCONDUCT.md CONTRIBUTING.md etc Frameworks include lib Library LICENSE.txt opt README.md share SUPPORTERS.md .git .gitignore
➜ ~ brew install elinks
==> Downloading http://elinks.or.cz/download/elinks-0.11.7.tar.bz2
Already downloaded: /Library/Caches/Homebrew/elinks-0.11.7.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/elinks/0.11.7_2 --without-spidermonkey --enable-256-colors
^C
➜ ~ elnks
zsh: command not found: elnks
➜ ~ elinks
zsh: command not found: elinks
➜ ~ /usr/local/Cellar/elinks
zsh: no such file or directory: /usr/local/Cellar/elinks
➜ ~ brew doctor
这是酿造医生:
Warning: The /usr/local is not writable.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami) /usr/local
Warning: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. For example, upgrading
to OS X El Capitan has been known to do this. Some versions of the
"InstantOn" component of Airfoil or running Cocktail cleanup/optimizations
are known to do this as well.
You should probably change the ownership and permissions of /usr/local
back to your user account.
sudo chown -R $(whoami):admin /usr/local
Warning: Python is installed at /Library/Frameworks/Python.framework
Homebrew only supports building against the System-provided Python or a
brewed Python. In particular, Pythons installed to /Library can interfere
with other software installs.
Warning: You have MacPorts or Fink installed:
/opt/local/bin/port
This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.
sudo mv /opt/local ~/macports
这是brew info elinks:
elinks: stable 0.11.7, devel 0.12pre6, HEAD
Text mode web browser
http://elinks.or.cz/
Not installed
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/elinks.rb
==> Dependencies
Required: openssl ✔
须藤酿造安装电子链接
sudo brew install elinks
Password:
Error: Cowardly refusing to 'sudo brew install'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.