我正在尝试安装塞博特在我的 Ubuntu 16.04.4 服务器上。我在使用 Python 时遇到了一些问题,所以我从系统中删除了所有 Python 版本。然后我从Python 社区,然后跑了
make
make install
然而,当我尝试运行
sudo add-apt-repository ppa:certbot/certbot
我收到一条错误消息,提示我找不到该命令
sudo: add-apt-repository: command not found
然后我看到了一个回答这个— 即安装该software-properties-common
包。
但是这样做会出现这个错误,
nuser@nserver:~$ sudo apt install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
dh-python : Depends: python3:any (>= 3.3.2-2~)
python3-asn1crypto : Depends: python3:any (>= 3.3.2-2~)
python3-certifi : Depends: python3:any (>= 3.4~)
python3-chardet : Depends: python3:any (>= 3.3.2-2~)
Depends: python3-pkg-resources but it is not going to be installed
python3-debian : Depends: python3-six (> 1.4~) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
Recommends: python3-apt but it is not going to be installed
python3-idna : Depends: python3:any (>= 3.3.2-2~)
python3-linecache2 : Depends: python3:any (>= 3.3.2-2~)
python3-pip : Depends: python-pip-whl (= 8.1.1-2ubuntu0.4) but it is not going to be installed
Depends: python3:any (>= 3.4~)
Recommends: python3-dev (>= 3.2) but it is not going to be installed
python3-pycurl : Depends: python3 (< 3.6) but it is not going to be installed
Depends: python3 (>= 3.5~) but it is not going to be installed
python3-setuptools : Depends: python3-pkg-resources (= 33.1.1-1+certbot~xenial+1) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
python3-testresources : Depends: python3:any (>= 3.3.2-2~)
python3-traceback2 : Depends: python3:any (>= 3.3.2-2~)
python3-unittest2 : Depends: python3-pkg-resources but it is not going to be installed
Depends: python3-six (>= 1.4) but it is not going to be installed
Depends: python3:any (>= 3.3.2-2~)
python3-update-manager : Depends: python3:any (>= 3.3.2-2~)
Depends: python3-apt (>= 0.8.5~) but it is not going to be installed
Depends: python3-distupgrade but it is not going to be installed
Depends: lsb-release but it is not going to be installed
python3-wheel : Depends: python3:any (>= 3.3.2-2~)
software-properties-common : Depends: python3:any (>= 3.3.2-2~)
Depends: python3 but it is not going to be installed
Depends: python3-gi but it is not going to be installed
Depends: gir1.2-glib-2.0 but it is not going to be installed
Depends: python-apt-common (>= 0.9) but it is not going to be installed
Depends: python3-dbus but it is not going to be installed
Depends: python3-software-properties (= 0.96.20.10) but it is not going to be installed
ufw : Depends: python3:any (>= 3.3.2-2~)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
任何帮助都将非常有帮助。
答案1
我能够通过部署另一个 Ubuntu 16.04 实例来解决这个问题。
/usr/bin/py*
我将从工作实例中删除的文件复制到了我损坏的机器上。
这使我可以通过更新和删除损坏的链接和包来手动解决我的个人错误。
感谢@BrianTurek 和@Guiverc 的帮助。