问题描述
最近在Ubuntu安装swoole的时候,需要执行sudo apt-get install php-dev
来安装 phpize
但是在执行的时候报错如下:
After this operation, 55.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libicu64 amd64 64.1-0.1+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libpcre2-16-0 amd64 10.31-3+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libpcre2-32-0 amd64 10.31-3+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:4 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libpcre2-8-0 amd64 10.31-3+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:5 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libpcre2-posix0 amd64 10.31-3+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:6 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libpcre2-dev amd64 10.31-3+ubuntu16.04.1+deb.sury.org+1
404 Not Found
Err:7 http://ppa.launchpad.net/ondrej/php/ubuntu xenial/main amd64 libsodium23 amd64 1.0.17-0.1+ubuntu16.04.1+deb.sury.org+1
404 Not Found
…
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
以上一系列404 Not Found
解决方案
此时只需要执行sudo apt-get update
这个命令,会访问源列表里的每个网址,并读取软件列表,然后保存在本地电脑
然后再执行 sudo apt-get install php-dev
即可。