私が追加した新しいリポジトリが見つかりませんでしたか?

私が追加した新しいリポジトリが見つかりませんでしたか?

CrunchBangを実行しており、出力は次のようになります。uname -a

Linux sigh 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08) x86_64 GNU/Linux

私のものsources.list

# Crunchbang
deb http://packages.crunchbang.org/waldorf waldorf main
deb-src http://packages.crunchbang.org/waldorf waldorf main

# Debian Wheezy
deb http://http.debian.net/debian wheezy main contrib non-free
deb-src http://http.debian.net/debian wheezy main contrib non-free

# Debian Jessie
deb http://ftp.de.debian.org/debian jessie main
deb http://http.debian.net/debian jessie main contrib non-free
deb-src http://http.debian.net/debian jessie main contrib non-free

# Debian Security
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

# Debian Backports
deb http://http.debian.net/debian wheezy-backports main contrib non-free

# Debian Multimedia
deb http://www.deb-multimedia.org wheezy main non-free

# Oracle Java
deb http://www.duinsoft.nl/pkg debs all

apt-add-repositoryしたがって、経由で新しいストレージを追加して実行するたびに、apt-get update次の形式のエラーが発生します。

W: Failed to fetch http://ppa.launchpad.net/conky-companions/ppa/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://ppa.launchpad.net/conky-companions/ppa/ubuntu/dists/jessie/main/binary-i386/Packages  404  Not Found

私が要求しているバージョンがjessie/mainほとんどのパッケージ(?)には存在しないためだと思います。

私がそれを得ることをどのように防ぐことができるかを知っている人はいますかjessie/main?それとも、このリポジトリを機能させるために正確に何が起こっているのかを説明してください。

ベストアンサー1

add-apt-repositoryリリースコード名を自動的に検出し、これを行うオプションは提供されません。もちろん、Debian バージョンと Ubuntu バージョンが魔法のように一致するわけではなく、そうするには編集する必要があります/etc/lsb-releaseadd-apt-repository呼ぶからです。SoftwareProperties.add_source_from_shortcut、これは順番に使用されます。aptsources.distro.get_distro()コード名の決定:

aptsources.distro.get_distro(id=None, codename=None, description=None, release=None)
Check the currently used distribution and return the corresponding distriubtion class that supports distro specific features.
If no paramter are given the distro will be auto detected via a call to lsb-release

(いいえ、それは私が書いたスペルではありません。)

したがって、必要に応じて適切なUbuntuバージョン(ほとんどのLaunchpad PPAターゲット)を編集して/etc/lsb-release変更します。DISTRIB_CODENAMEtrusty


あるいは、実際のラインを構築することもできます。ppa:username/ppa-name次のように翻訳されました:

add-apt-repository https://ppa.launchpad.net/username/ppa-name/ubuntu $(lsb_release -sc)

もちろんなど$(lsb_release -sc)に置き換えられます。trustyまた、手動でGPGキーを取得して追加する必要があります。また、.に新しいファイルを作成するのではなく、そのエントリが./etc/apt/sources.list.dに追加されるという欠点もあります/etc/apt/sources.list


その値が一致するようにDISTRIB_ID合計を変更する必要があるようです。DISTRIB_CODENAME

$ lsb_release -sc
trusty
$ sudo sed 's/trusty/wheezy/' -i /etc/lsb-release
$ lsb_release -sc                                
wheezy
$ sudo add-apt-repository ppa:conky-companions/ppa
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 91, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/wheezy
$ sudo sed 's/trusty/wheezy/;s/Ubuntu/Debian/' -i /etc/lsb-release
$ sudo add-apt-repository ppa:conky-companions/ppa                

 More info: https://launchpad.net/~conky-companions/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp19qsp29e/secring.gpg' created
#...
gpg:               imported: 1  (RSA: 1)
OK
$ cat /etc/apt/sources.list.d/conky-companions-ppa-wheezy.list 
deb http://ppa.launchpad.net/conky-companions/ppa/ubuntu wheezy main
# deb-src http://ppa.launchpad.net/conky-companions/ppa/ubuntu wheezy main
$ sudo rm /etc/apt/sources.list.d/conky-companions-ppa-wheezy.list 
$ sudo sed 's/wheezy/trusty/' -i /etc/lsb-release
$ sudo add-apt-repository ppa:conky-companions/ppa                
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 91, in <module>
    sp = SoftwareProperties(options=options)
#...
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Debian/trusty
$ sudo sed 's/wheezy/trusty/;s/Debian/Ubuntu/' -i /etc/lsb-release
$ sudo add-apt-repository ppa:conky-companions/ppa                

 More info: https://launchpad.net/~conky-companions/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpnz_771l_/secring.gpg' created
#...
OK

もちろん追加するリポジトリは今後この変更にはまだ手動修正が必要です。

おすすめ記事