0

I am trying to test PHP 7.0 installation on vagrant using Ansible and get this error:

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."}

Tried to update manually and again no success:

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.

Tried to remove 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

My /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/ output:

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

How can I deal with this error?

0

You can remove this ppa manually:

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

Then:

sudo apt-get update

If you want to use this ppa add trusty codename instead of jessie :

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

Then add the following line:

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

then run sudo apt-get update , see the accepted codnames for ansible ppa, as you can see jessie directory isn't listed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.