首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >尝试安装Certbot后出现Homebrew/Python错误

尝试安装Certbot后出现Homebrew/Python错误
EN

Stack Overflow用户
提问于 2019-05-26 05:26:54
回答 1查看 300关注 0票数 0

我正在尝试在我的macOS机器(10.14.4)上安装Certbot来生成证书,但是像往常一样,一些自制的错误阻碍了我的工作。

在运行brew updatebrew install certbot之后,我尝试了一个基于sudo certbot certonly -a manual -d example.com --email your@email.com的命令,但得到了sudo: certbot: command not found。我也尝试过brew upgrade

brew doctor显示:

代码语言:javascript
运行
复制
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命令工作?提前感谢

EN

回答 1

Stack Overflow用户

发布于 2019-05-26 07:52:55

代码语言:javascript
运行
复制
sudo mkdir /usr/local/Frameworks
sudo chmod 1777 

然后

代码语言:javascript
运行
复制
brew link python3

这将安装你的python3在你的mac上,我不会卸载Python2.7,因为仍然有很多脚本依赖于Python2.7!

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56308842

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档