I followed the procedure described here https://packages.sury.org/php/README.txt for adding an APT repository that has some packages i need to install ( for example i need php7.0-dev).
sudo apt-get -y install apt-transport-https lsb-release ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' sudo apt-get update
AFAIU, the above commands intend to install the SSL certificate for packages.sury.org, so that the APT command can communicate to the packages.sury.org server via SSL.
Then the APT repository is added to sources.list.d.
On the last command, apt-get update, i get the following error:
W: Failed to fetch https://packages.sury.org/php/dists/trusty/main/binary-amd64/Packages gnutls_handshake() failed: Handshake failed
I think the SSL certificate has not been correctly installed to my local machine, so the first two commands were ineffective apparently.
What did go wrong?
Alternatively, would it be a good idea to clone the sury.org repository on a local website on my machine, with no SSL, and add the http://localhost repository instead of https://packages.sury.org? That would eliminate the need for APT to communicate via SSL.
EDIT: this is the output of gnutls-cli
gnutls-cli -V -V packages.sury.org:443 Resolving 'packages.sury.org:443'... Cannot resolve packages.sury.org:443:443: Name or service not known gnutls-cli -V -V packages.sury.org Resolving 'packages.sury.org'... Connecting to '184.108.40.206:443'... *** Fatal error: A TLS fatal alert has been received. *** Received alert : Handshake failed *** Handshake has failed GnuTLS error: A TLS fatal alert has been received. gnutls-cli -v gnutls-cli (GnuTLS) 2.12.23 Packaged by Debian (2.12.23-12ubuntu2.8) Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Nikos Mavrogiannopoulos.