Установка certbot на Ubuntu 16.04.4, которую LTS (на Azure) приводит к сбою с “Вами, содержала поврежденные пакеты”.

При следовании инструкциям на здесь https://certbot.eff.org/lets-encrypt/ubuntuxenial-nginx я пытался выполнить эту команду:

sudo apt-get install python-certbot-nginx 

Но я получаю следующую ошибку:

~$sudo apt-get install python-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Попытка установить python3-certbot-nginx показывает несколько более подробной информации:

~$ sudo apt-get install python3-certbot-nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-certbot-nginx : Depends: certbot (>= 0.25.0~) but it is not going to be installed
                         Depends: python3-acme but it is not going to be installed
                         Depends: python3-certbot but it is not going to be installed
                         Depends: python3-mock but it is not installable
                         Depends: python3-pyparsing (>= 1.5.5) but it is not installable
E: Unable to correct problems, you have held broken packages.

Я работал sudo apt upgrade и несколько вещей были обновлены, но я все еще получил ту же ошибку. Команда обновления отказалась обновлять эти три объекта: liblxc1, lxd, lxd-client (не уверенный, почему)

Я затем пытался использовать certbot-автоматический инструмент и, казалось, сталкивался с подобной проблемой:

~$ wget https://dl.eff.org/certbot-auto
~$ chmod a+x ./certbot-auto
~$ sudo ./certbot-auto --install-only
Bootstrapping dependencies for Debian-based OSes... (you can skip this with --no-bootstrap)
Hit:1 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:4 https://repos.influxdata.com/ubuntu xenial InRelease
Hit:5 https://nginx.org/packages/mainline/ubuntu xenial InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gcc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  gcc-5-doc

Package libffi-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package python-virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python

E: Package 'python-dev' has no installation candidate
E: Package 'python-virtualenv' has no installation candidate
E: Package 'gcc' has no installation candidate
E: Package 'libffi-dev' has no installation candidate

Я не уверен, куда пойти отсюда. Какая-либо идея, почему это происходит и как решить вопрос?

0
задан 17 July 2018 в 12:22

1 ответ

Что я сделал для решения этой проблемы на 18,04. Посмотрите, есть ли у Вас Python не просто python3 установленный.

python -V

Должен дать Вам номер версии. Если нет:

sudo apt install python

Затем можно добавить Python certbot. Необходимо будет добавить репозиторий, который имеет его:

sudo add-apt-repository universe

Затем необходимо смочь:

sudo apt-get install python-certbot-nginx 

Можно искать репозитории здесь: https://packages.ubuntu.com/search? keywords=python-certbot-nginx&searchon=names&suite=bionic&section=all

3
ответ дан 28 October 2019 в 08:08

Другие вопросы по тегам:

Похожие вопросы: