0

I am trying to install cerbot on my Ubuntu 16.04.4 server. I was having some trouble with python, so I removed all python versions from the system. I then downloaded the latest 3.8 release from Python.org, and ran

make
make install 

However, when I try to run

sudo add-apt-repository ppa:certbot/certbot

I am getting an error telling me that the command cannot be found

sudo: add-apt-repository: command not found

So I then saw an answer to this - which is to install the software-properties-common package.

However doing so gives me this error,

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).

Any help would be great.

Patrick
  • 101

1 Answers1

0

I was able to solve the problem by deploying another instance of Ubuntu 16.04.

I copied the files that I deleted from /usr/bin/py* from the working instance, onto my broken machine.

This got me to a point where I could manually solve my individual errors by updating and removing broken links and packages.

Thank you @BrianTurek and @Guiverc for the help.

Patrick
  • 101