在 Debian 上将 PHP 从 7.4.6 升级到 7.4.12 时出现问题

在 Debian 上将 PHP 从 7.4.6 升级到 7.4.12 时出现问题

我在 Debian 上运行 PHP 7.4.6,想要升级到 7.4.12 我运行此命令

sudo apt-get --only-upgrade install php7.4

我明白了

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.4
E: Couldn't find any package by glob 'php7.4'
E: Couldn't find any package by regex 'php7.4'

所以我尝试了这个

sudo apt-add-repository ppa:ondrej/php

计划在之后运行这些命令

sudo apt-get update
sudo apt-get install php7.4

但是一旦我运行sudo apt-add-repository ppa:ondrej/php并按下回车键我就得到了

  Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
  self.run()
File "/usr/lib/python3.7/threading.py", line 865, 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 252, in add_ppa_signing_key
  tmp_keyring, tmp_secret_keyring, signing_key_fingerprint, tmp_keyring_dir):
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 181, in _recv_key
  "--recv", signing_key_fingerprint,
File "/usr/lib/python3.7/subprocess.py", line 323, in call
  with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
  restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
  raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gpg': 'gpg'

如何修复此问题以在 Debian 10 上将 PHP 7.4.6 升级到 7.4.12?

相关内容