-1

I have php 7.0 / nginx on my debian server. I'd like to upgrade it to at least php 7.1. Following the guide on https://launchpad.net/~ondrej/+archive/ubuntu/php I ran into many problem.

groot@vps149861:/etc/apt# sudo apt-add-repository ppa:ondrej/nginx
password:
 This branch follows latest NGINX Stable packages compiled against latest OpenSSL for HTTP/2 and TLS 1.3 support.

BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/#bug-reporting

PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://donate.sury.org
 More info: https://launchpad.net/~ondrej/+archive/ubuntu/nginx
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpd49klpme/pubring.gpg' created
gpg: /tmp/tmpd49klpme/trustdb.gpg: trustdb created
gpg: key 4F4EA0AAE5267A6C: public key "Launchpad PPA for Ondřej Surý" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: no valid OpenPGP data found.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
    func(**kwargs)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
    return apsk.add_ppa_signing_key()
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 273, in add_ppa_signing_key
    cleanup(tmp_keyring_dir)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in cleanup
    shutil.rmtree(tmp_keyring_dir)
  File "/usr/lib/python3.5/shutil.py", line 480, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra'
groot@vps149861:/etc/apt# sudo apt-get update
Hit:1 http://security.debian.org stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease                                                                                                            
Hit:3 http://deb.debian.org/debian stretch-updates InRelease                                                                                                    
Hit:4 http://deb.debian.org/debian stretch-backports InRelease                                                                                                  
Hit:5 http://deb.debian.org/debian stretch Release                                                                                                              
Hit:6 http://mirror.aarnet.edu.au/pub/MariaDB/repo/10.2/debian stretch InRelease                    
Hit:7 https://download.docker.com/linux/debian stretch InRelease                                    
Ign:8 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco InRelease            
Hit:10 https://apt.blobfolio.com/debian stretch InRelease                     
Get:11 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease [20.8 kB]
Ign:11 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease              
Ign:12 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco Release              
Get:13 http://ppa.launchpad.net/ondrej/php/ubuntu disco/main amd64 Packages [30.6 kB]
Get:14 http://ppa.launchpad.net/ondrej/php/ubuntu disco/main Translation-en [11.5 kB]
Ign:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages     
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US
Ign:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages                                                                                     
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en                                                                                   
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US                                                                                
Ign:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages                                                                                   
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages                                                                                     
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en                                                                                   
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US                                                                                
Ign:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages                                                                                   
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages                                                                                     
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en                                                                                   
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US                                                                                
Ign:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages                                                                                   
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US
Err:15 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main amd64 Packages
  404  Not Found
Ign:16 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main all Packages
Ign:17 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en
Ign:18 http://ppa.launchpad.net/ondrej/nginx/ubuntu disco/main Translation-en_US
Fetched 62.9 kB in 16s (3,899 B/s)
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository 'http://ppa.launchpad.net/ondrej/nginx/ubuntu disco Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/ondrej/nginx/ubuntu/dists/disco/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

I realise the important bit is probably NO_PUBKEY 4F4EA0AAE5267A6C but what do I type in to fix that so that an apt-get update will work at all?

1 Answer 1

2

Have you added the repository as instructed in the README.txt for PHP and Nginx?

This part adds the DEB.SURY.ORG Automatic Signing Key (and it's the same key for Nginx):

apt-get -y install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg

Your main problem is that you are using Ubuntu repositories on Debian:

Hit:1 http://security.debian.org stretch/updates InRelease

Get:11 http://ppa.launchpad.net/ondrej/php/ubuntu disco InRelease [20.8 kB]   
Get:13 http://ppa.launchpad.net/ondrej/php/ubuntu disco/main amd64 Packages [30.6 kB]
Get:14 http://ppa.launchpad.net/ondrej/php/ubuntu disco/main Translation-en [11.5 kB]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .