적절한 업데이트 및 ppa 삭제시 오류

적절한 업데이트 및 ppa 삭제시 오류

Ansible을 사용하여 vagrant에서 PHP 7.0 설치를 테스트하려고 하는데 다음 오류가 발생합니다.

TASK [php-cli : Install php7.0-cli package] *****************************************************************************
Thursday 21 November 2019  20:08:15 +0000 (0:00:00.034)       0:00:02.156 *****
fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Failed to fetch http://ppa.launchpad.net/ansible/ansible/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found [IP: 127.0.0.1]\n, E:Some index files failed to download. They have been ignored, or old ones used instead."}

수동 업데이트를 다시 시도했지만 성공하지 못했습니다.

vagrant@jessie:~/ansible/infra/deployment$ sudo apt update
Ign http://ppa.launchpad.net jessie InRelease
Ign http://ppa.launchpad.net jessie Release.gpg
Ign http://ppa.launchpad.net jessie Release
Err http://ppa.launchpad.net jessie/main amd64 Packages
Err http://ppa.launchpad.net jessie/main amd64 Packages
Ign http://httpredir.debian.org jessie InRelease
Err http://ppa.launchpad.net jessie/main amd64 Packages
Get:1 http://httpredir.debian.org jessie-updates InRelease [16.3 kB]
Hit http://security.debian.org jessie/updates InRelease
Err http://ppa.launchpad.net jessie/main amd64 Packages
Hit http://httpredir.debian.org jessie Release.gpg
Err http://ppa.launchpad.net jessie/main amd64 Packages
  404  Not Found [IP: 127.0.0.1]
Hit http://httpredir.debian.org jessie Release
Hit http://security.debian.org jessie/updates/main Sources
Get:2 http://httpredir.debian.org jessie-updates/main Sources [20 B]
Hit http://security.debian.org jessie/updates/main amd64 Packages
Get:3 http://httpredir.debian.org jessie-updates/main amd64 Packages [20 B]
Hit http://httpredir.debian.org jessie/main Sources
Hit http://httpredir.debian.org jessie/main amd64 Packages
Fetched 16.3 kB in 2s (5,943 B/s)
W: Failed to fetch http://ppa.launchpad.net/ansible/ansible/ubuntu/dists/jessie/main/binary-amd64/Packages  404  Not Found [IP: 127.0.0.1]
E: Some index files failed to download. They have been ignored, or old ones used instead.

ppa를 제거해보십시오.

vagrant@jessie:~/ansible/infra/deployment$ sudo add-apt-repository --remove ppa:whatever/ppa
Cannot access PPA (https://launchpad.net/api/1.0/~whatever/+archive/ppa) to get PPA information, please check your internet connection.
vagrant@jessie:~/ansible/infra/deployment$ ping -c3 www.google.com
PING www.google.com 56(84) bytes of data.
64 bytes from waw02s08-in-f196.1e100.net (): icmp_seq=1 ttl=63 time=48.7 ms
64 bytes from waw02s08-in-f196.1e100.net : icmp_seq=2 ttl=63 time=26.8 ms
64 bytes from waw02s08-in-f196.1e100.net : icmp_seq=3 ttl=63 time=48.1 ms
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 26.818 ms

내 거 /etc/apt/sources.list:

deb http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie main

deb http://httpredir.debian.org/debian jessie-updates main
deb-src http://httpredir.debian.org/debian jessie-updates main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

/etc/apt/sources.list.d/산출:

vagrant@jessie:/etc/apt$ ls
apt.conf.d        preferences.d  sources.list~   sources.list.save  trusted.gpg~
listchanges.conf  sources.list   sources.list.d  trusted.gpg        trusted.gpg.d
vagrant@jessie:/etc/apt$ cd sources.list.d/
vagrant@jessie:/etc/apt/sources.list.d$ ls
ansible-ansible-jessie.list

이 오류를 어떻게 처리해야 합니까?

답변1

이 ppa를 수동으로 삭제할 수 있습니다.

sudo rm /etc/apt/sources.list.d/ansible-ansible-jessie.list

그 다음에:

sudo apt-get update

이 ppa를 사용하려면 trusty대신 코드명을 추가하세요 jessie.

sudo nano /etc/apt/sources.list.d/ansible-ansible-jessie.list

그런 다음 다음 줄을 추가합니다.

deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main

그런 다음 실행하여 sudo apt-get update허용되는 코드 이름을 확인하세요.안시푸르 PPA, 보시다시피 jessie 디렉토리는 나열되지 않습니다.

관련 정보