404安装PHP5-Curl时出错

时间:2017-11-28 17:04:44

标签: ubuntu curl

我有Ubuntu 12.04和PHP 5.6.11并运行Apache / 2.4.12。我正在尝试使用PHP安装/运行Curl。在运行sudo apt-get update之后,当我从php页面运行var_dump(function_exists('curl_init')); print时,运行以下命令并获得404错误和bool(false)。 。

   sudo apt-get install php5-curl && echo $? 
        Reading package lists... Done 
        Building dependency tree 
        Reading state information... Done 
        The following package was automatically installed and is no longer required: 
        kde-l10n-engb 
        Use 'apt-get autoremove' to remove it. 
        The following NEW packages will be installed: 
        php5-curl 
        0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 
        Need to get 30.0 kB of archives. 
        After this operation, 114 kB of additional disk space will be used. 
        WARNING: The following packages cannot be authenticated! 
        php5-curl 
        Install these packages without verification? [y/N] y 
        Err us.archive.ubuntu.com/ubuntu wily-updates/main php5-curl i386 5.6.11+dfsg-1ubuntu3.4 
        404 Not Found [IP: 91.189.91.26 80] 
        Err security.ubuntu.com/ubuntu wily-security/main php5-curl i386 5.6.11+dfsg-1ubuntu3.4 
        404 Not Found [IP: 91.189.88.149 80] 
        E: Failed to fetch security.ubuntu.com/ubuntu/… 404 Not Found [IP: 91.189.88.149 80] 

        E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我运行sudo find / -name curl.so\*并且什么也没得到,并且被告知这意味着模块仍未安装。

1 个答案:

答案 0 :(得分:0)

您的包列表已过时并指向不再存在的包(通常是因为foo5.1.1foo5.1.2取代而被删除) - 只需先运行apt-get update,应该修复404问题。