Ubuntu 更新源错误的一些解决办法

Ken
Ken
2018-03-18 / 0 评论 / 4,655 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2018年03月23日,已超过2275天没有更新,若内容或图片失效,请留言反馈。

1、连接到ipv6的更新站点

    root@iotshare:/etc/lighttpd/conf-available#sudo apt-get update
    Get:1http://ppa.launchpad.net/ondrej/php/ubuntuxenialInRelease[23.9kB]
    Hit:2http://archive.ubuntu.com/ubuntuxenialInRelease
    Hit:3http://archive.canonical.com/ubuntuxenialInRelease
    Get:4http://archive.ubuntu.com/ubuntuxenial-updatesInRelease[102kB]
    Ign:1http://ppa.launchpad.net/ondrej/php/ubuntuxenialInRelease
    0%[Connectingtosecurity.ubuntu.com(2001:67c:1562::16)]

可以强制使用ipv4来进行源更新。

    apt-get -o Acquire::ForceIPv4=true update

2、公钥认证失败

    Reading package lists... Done
    W: 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 4F4EA0AAE5267A6C
    W: 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 --recv-keys --keyserver keyserver.ubuntu.com 4F4EA0AAE5267A6C
0

评论 (0)

取消