我正在尝试在我的macOS机器(10.14.4)上安装Certbot来生成证书,但是像往常一样,一些自制的错误阻碍了我的工作。
在运行brew update
和brew install certbot
之后,我尝试了一个基于sudo certbot certonly -a manual -d example.com --email your@email.com
的命令,但得到了sudo: certbot: command not found
。我也尝试过brew upgrade
。
brew doctor
显示:
Warning: The following directories do not exist:
/usr/local/sbin
You should create these directories and change their ownership to your account.
sudo mkdir -p /usr/local/sbin
sudo chown -R $(whoami) /usr/local/sbin
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
python@2
python
brew link python
返回Linking /usr/local/Cellar/python/3.7.3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
。
由于某些原因,看起来我现在已经安装了两个版本的Python,并且我不想运行Homebrew建议的任何命令,直到我知道我需要这样做。python --version
返回Python 2.7.10
。
我应该卸载我的Python吗?其中一个是系统版本,还是第三个安装在其他地方?我应该符号链接哪一个,以及如何让certbot命令工作?提前感谢
发布于 2019-05-26 07:52:55
sudo mkdir /usr/local/Frameworks
sudo chmod 1777
然后
brew link python3
这将安装你的python3在你的mac上,我不会卸载Python2.7,因为仍然有很多脚本依赖于Python2.7!
https://stackoverflow.com/questions/56308842
复制相似问题