本文共 1486 字,大约阅读时间需要 4 分钟。
安装了php第三方源后apt-get update遇到如下错误:
$ sudo apt-get update -yHit:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid InReleaseGet:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]Hit:3 http://archive.ubuntu.com/ubuntu xenial InReleaseGet:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease [23.9 kB]Get:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]Ign:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InReleaseGet:6 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]Fetched 347 kB in 2s (140 kB/s)Reading package lists... DoneW: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6CW: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu xenial 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.
解决办法:
$ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6CExecuting: /tmp/tmp.wyAfMZc8sV/gpg.1.sh --keyserverkeyserver.ubuntu.com--recv-keys4F4EA0AAE5267A6Cgpg: requesting key E5267A6C from hkp server keyserver.ubuntu.comgpg: key E5267A6C: public key "Launchpad PPA for Ond\xc5\x99ej Sur�" importedgpg: Total number processed: 1gpg: imported: 1 (RSA: 1)
参考:
转载地址:http://armli.baihongyu.com/