Ubuntu: add-apt-repository: command not found

Автор: | 05/01/2017
 

При добавлении нового репозитория с помощью add-apt-repository – ошибка:

# add-apt-repository -y ppa:webupd8team/java
bash: add-apt-repository: command not found

Решение – установить пакет software-properties-common:

# apt-get install software-properties-common
...
The following NEW packages will be installed:
  apt-utils ca-certificates cron dbus dh-python distro-info-data file gir1.2-glib-2.0 iso-codes krb5-locales libapt-inst2.0 libasn1-8-heimdal libcap-ng0 libcurl3-gnutls libdbus-1-3 libdbus-glib-1-2 libexpat1 libffi6 libgirepository-1.0-1 libglib2.0-0 libglib2.0-data
...
  python-apt-common python3 python3-apt python3-dbus python3-gi python3-minimal python3-pycurl python3-software-properties python3.5 python3.5-minimal sgml-base shared-mime-info software-properties-common ucf unattended-upgrades xdg-user-dirs xml-core xz-utils
0 upgraded, 76 newly installed, 0 to remove and 7 not upgraded.
Need to get 24.1 MB of archives.
After this operation, 114 MB of additional disk space will be used.
...

Повторяем:

# add-apt-repository -y ppa:webupd8team/java
gpg: keyring `/tmp/tmp4w91811p/secring.gpg' created
gpg: keyring `/tmp/tmp4w91811p/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp4w91811p/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

Готово.