塩焼きブログ

塩焼きに関しての研究内容を公開しています

Ubuntuでadd-apt-repository: command not foundと言われた時の対策

下記のようなエラーが出た

root@38ac508afb51:/# add-apt-repository ppa:jonathonf/ffmpeg-3
bash: add-apt-repository: command not found

software-properties-commonpython-software-propertiesをインストールする

apt update
apt install software-properties-common python-software-properties

再度実行したら成功した

root@38ac508afb51:/# add-apt-repository ppa:jonathonf/ffmpeg-3

 Backport and/or package of FFMPEG 3 and key libraries

***

Cumulative downloads at 2017-12-20: 68,504 (based on ffmpeg)

Total downloads of 3.4: 24,113
Total downloads of 3.3.2: 2,814

***

Find PPAs useful? Consider a donation to those you use.
 More info: https://launchpad.net/~jonathonf/+archive/ubuntu/ffmpeg-3
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmp759hyr6g/secring.gpg' created
gpg: keyring `/tmp/tmp759hyr6g/pubring.gpg' created
gpg: requesting key F06FC659 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp759hyr6g/trustdb.gpg: trustdb created
gpg: key F06FC659: public key "Launchpad PPA for J Fernyhough" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

参考

https://qiita.com/strsk/items/3a46a27ed12c49740ad3