1

This question already has an answer here:

I am using linux debian 8. I have webmin/virtualmin installed and 1 domain is running over the server. Php version is 7.1. But, i can not run curl on my server. i tried to install curl but it throws below error

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have tried all below commands which are not working:

sudo apt-get -f install 
sudo apt-get update 
sudo apt-get clean 
sudo apt-get upgrade

sudo apt-get update shows below errors:

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743

W: Failed to fetch http://debian.mirrors.ovh.net/debian/dists/jessie-updates/InRelease  Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch https://packages.sury.org/php/dists/jessie/InRelease

W: Some index files failed to download. They have been ignored, or old ones used instead.}

my sources.list file content:

# deb cdrom:[Debian GNU/Linux 8.7.1 _Jessie_ - Official amd64 NETINST Binary-1 20170116-10:57]/ jessie main

#deb cdrom:[Debian GNU/Linux 8.7.1 _Jessie_ - Official amd64 NETINST Binary-1 20170116-10:57]/ jessie main

deb http://debian.mirrors.ovh.net/debian jessie main
deb-src http://debian.mirrors.ovh.net/debian jessie main

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

# jessie-updates, previously known as 'volatile'
deb http://debian.mirrors.ovh.net/debian jessie-updates main
deb-src http://debian.mirrors.ovh.net/debian jessie-updates main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-jessie main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

marked as duplicate by Jeff Schaller May 12 at 15:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Then you can see there is something wrong in your apt configuration... please add the content of /etc/apt/sources.list file in your post. And by the way, is your server connected on internet and able to go out? – darxmurf May 10 at 6:07
  • yes, my website is live. only curl portion is not running. – Amit May 10 at 6:09
  • I have added sources.list file in question part – Amit May 10 at 6:13
  • hey @gad3r, can you help for this issue? – Amit May 11 at 3:16
0

Well, not sure if you did run correctly your command as everything is in one line

apt-get clean
apt-get update
apt-get install php-curl

if you run apt-get upgrade this will upgrade all the package on your system, not install curl. But it's something to do anyway to keep your system up to date.

okay, it looks like you are in France, then I would suggest to change your sources.list as follow

deb http://ftp.fr.debian.org/debian/ jessie main  
deb http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.fr.debian.org/debian/ jessie-updates main

deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-jessie main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

it looks like you also have this "sury.org" repository for PHP, I don't know it but you will need to install it's key as described in his readme file.

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

As I don't know this repository at all, it's your decision to install this key and use it.

Then save your file and run apt-get update to see the result

  • yes, i run each command separately. I just don't how to break line in stackexchange – Amit May 10 at 5:49
  • if still not working, please paste the result of those 3 commands (edit your question to do that and use the "{}" button to format it the right way) – darxmurf May 10 at 5:52
  • apt-get clean return no result – Amit May 10 at 5:55
  • I have added result for apt-get update in the question part – Amit May 10 at 6:00
  • i just want to resolve below error in my php file. let me know if there is any other way. Call to undefined function curl_init() – Amit May 10 at 6:25
0

W: Failed to fetch http://debian.mirrors.ovh.net/debian/dists/jessie-updates/InRelease Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)

You should remove the jessie-updates from your /etc/apt/sources.list:

deb http://debian.mirrors.ovh.net/debian jessie main
deb-src http://debian.mirrors.ovh.net/debian jessie main

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

deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-jessie main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

see : Failed to fetch jessie backports repository and Debian apt-get update says ''Unable to find expected entry"

W: Failed to fetch https://packages.sury.org/php/dists/jessie/InRelease

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743

Because the the siging key has been changed in 18 Mars 2019 by Ondřej Surý (A debian developper, php maintainer and more ...). You need to update the signing key.

packages.sury.org Debian repository GPG key has been changed

DPA New Signing Key

I was informed that the current DPA signing key DF3D585DB8F0EB658690A554AC0E47584A7A714D was present on the server maintained by an other user of the repositories that got compromised. I do not believe that the users of the packages.sury.org repositories are at any risk because launching attack on the APT repositories using a compromised key would require also attacking other components in the path (HTTPS certificate and DNSSEC), but nevertheless, I have generated a new GPG key to sign the repositories with: 15058500A0235D97F5D10063B188E2B695BD4743. To verify the authenticity of the new key, you can check that there's a signature from my personal signing key: 30B9 33D8 0FCE 3D98 1A2D 38FB 0C99 B70E F4FC BB07.

To update the APT signing key, you can download the new key from the respective repositories, f.e. for the PHP, you would do:

wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

This doesn't affect any of the Launchpad PPAs, only the Debian packages hosted at packages.sury.org.

  • 1
    your above answer is not working. But one of your previous answer worked for me. below is your previous answer that worked for me. unix.stackexchange.com/questions/443192/… – Amit May 12 at 3:07
  • Thank you GAD3R for giving your precious time for my question. – Amit May 12 at 3:08

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