GNU/Linux >> Linux の 問題 >  >> Debian

UbuntuとDebianで見つからないadd-apt-repositoryコマンドを修正する方法


Linux Mint、Linux Lite、Zorin OS、エレメンタリーOS、その他のUbuntuベースのディストリビューション、およびUbuntuとDebianの場合、 add-apt-repositoryというエラーが表示されることがあります。 コマンドがありません。

$ sudo: add-apt-repository: command not found

このチュートリアルでは、Debian、Ubuntu、およびその他のDebianベースのLinuxディストリビューションで「add-apt-repositoryコマンドが見つかりません」エラーをすばやく修正する方法を説明します。

パーソナルパッケージアーカイブとは

PPAは、個人リポジトリのWebURLです。リポジトリは、さまざまなソフトウェア、それらのバージョン、およびチェックサムなどの他の詳細に関する情報を含むファイルのコレクションです。 Ubuntuの各バージョンには、4つのリポジトリの独自の公式セットがあります。

パッケージがまだ公式リポジトリにない場合、UbuntuまたはDebianにソフトウェアをインストールする最も一般的な方法は、PPA(パーソナルパッケージアーカイブ)を使用することです。

add-apt-repository は、UbuntuおよびDebian LinuxにPPA(パーソナルパッケージアーカイブ)を追加するためのコマンドラインユーティリティです。

Ubuntuに新しいPPA(パーソナルパッケージアーカイブ)を追加する

新しいPPAリポジトリを追加する場合は、 add-apt-repositoryを使用する必要があります コマンド:

sudo add-apt-repository ppa:some/ppa

例:

sudo add-apt-repository ppa:dr-akulavich/lighttable
sudo apt-get update
sudo apt-get install lighttable-installer

コマンドが見つからないというエラーが表示された場合は、最初に add-apt-repositoryを含むパッケージをインストールする必要があります。 ユーティリティ。

add-apt-repository:コマンドが見つからないというエラーを修正

つまり、 add-apt-repository 新しいシステムでのコマンドは、パッケージ software-properties-common の下にあります 、 add-apt-repository をインストールするには、最初にそのパッケージをインストールする必要があります 。

Debian /UbuntuLTSへのパッケージのインストール

18.04、16.04、14.04システムなどのDebian / Ubuntu LTSを使用している場合は、 software-properties-commonをインストールします。 add-apt-repositoryを取得するためのパッケージ コマンド。

$ sudo apt-get install -y software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  software-properties-common
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9384 B of archives.
After this operation, 188 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main software-properties-common all 0.92.37.8 [9384 B]
Fetched 9384 B in 0s (47.0 kB/s)               
Selecting previously unselected package software-properties-common.
(Reading database ... 62966 files and directories currently installed.)
Preparing to unpack .../software-properties-common_0.92.37.8_all.deb ...
Unpacking software-properties-common (0.92.37.8) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up software-properties-common (0.92.37.8) ...

注: software-properties-commonというエラーが表示された場合 パッケージが見つからない場合は、 sudo apt-get updateを実行する必要があります その後、もう一度インストールしてみてください。

Ubuntu13.10以前へのパッケージのインストール

Ubuntu v13.10以前を使用している場合は、 add-apt-repository コマンドはpython-software-propertiesで利用できます パッケージ。そのため、代わりに apt-getを使用してそのパッケージをインストールしてください コマンド。

$ sudo apt-get install -y python-software-properties

software-properties-commonをインストールしたら 、または python-software-properties システムによっては、 add-apt-repositoryを快適に使用できるようになりました。 またはapt-add-repository PPAを追加するコマンド。

このチュートリアルで前述したPPAの例を追加してみましょう:

$ sudo add-apt-repository ppa:dr-akulavich/lighttable
 Light Table Installer: the package in this PPA downloads and installs the latest builds from http://lighttable.com/
 More info: https://launchpad.net/~dr-akulavich/+archive/ubuntu/lighttable
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpwybqddzt/secring.gpg' created
gpg: keyring `/tmp/tmpwybqddzt/pubring.gpg' created
gpg: requesting key 85C79C73 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpwybqddzt/trustdb.gpg: trustdb created
gpg: key 85C79C73: public key "Launchpad PPA for Anton Yakutovich" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

$ sudo apt-get update
......

$ sudo apt-get install lighttable-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  lighttable-installer
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 4292 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/dr-akulavich/lighttable/ubuntu/ trusty/main lighttable-installer amd64 0.8.0-1~ppa~3 [4292 B]
Fetched 4292 B in 0s (18.6 kB/s)         
.......
Download done.
Removing outdated cached downloads...
Unpacking lighttable-installer (0.8.0-1~ppa~3) ...
Processing triggers for mime-support (3.54ubuntu1.1) ...
Setting up lighttable-installer (0.8.0-1~ppa~3) ...
Successfully installed in /opt/LightTable

うまくいけば、これがPPAの問題の解決に役立つことを願っています。そうでない場合、または他に質問がある場合は、記事の下にコメントを残してください。

関連項目:

UbuntuでのPPAリポジトリの追加/削除


Debian
  1. bash:netstat:コマンドが見つかりません– Debian / Ubuntu Linux

  2. (解決済み)apt-add-repositoryコマンドが見つかりません–UbuntuとDebian

  3. CentOSで「semanageコマンド」が見つからないというエラーを修正する方法

  1. UbuntuとDebianでの「add-apt-repositoryコマンドが見つかりません」エラーを修正

  2. Ubuntu 14.04でスポーンコマンドが見つかりませんか?

  3. sudo:add-apt-repository:command not found エラーを修正

  1. Debian10で見つからないSudoコマンドを修正する方法

  2. rpm:コマンドが見つかりません

  3. apt:コマンドが見つかりません