Я пытаюсь установить cerbot на свой сервер Ubuntu 16.04.4. У меня были проблемы с python, поэтому я удалил все версии python из системы. Затем я загрузил последнюю версию 3.8 с Python.org и запустил
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).
Любая помощь будет отлично.
I смог решить проблему, развернув другой экземпляр Ubuntu 16.04.
Я скопировал файлы, которые удалил из /usr/bin/py*
с рабочего экземпляра, на свою сломанную машину.
Это привело меня к тому, что я мог вручную исправлять свои отдельные ошибки, обновляя и удаляя неработающие ссылки и пакеты.
Спасибо @BrianTurek и @Guiverc за помощь.