【问题标题】:404 Error when installing PHP5-Curl安装 PHP5-Curl 时出现 404 错误
【发布时间】:2017-11-28 17:04:44
【问题描述】:

我有 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\* 并没有得到任何结果,并被告知这意味着该模块仍未安装。

【问题讨论】:

  • Ubuntu 12.04 生命周期结束,所以也许这意味着不再维护软件包存储库。
  • 我正在安装 PHP5 curl 吗?我不确定操作系统与它有什么关系,因为 PHP5 在多个版本的 Ubuntu 上运行?
  • @RoccoTheTaco Karl 是对的。 Ubuntu(由 Canonical 软件维护)不再支持 Ubuntu 12,并且他们已删除您的 apt 命令尝试访问的 url。在这里,你可以自己看看us.archive.ubuntu.com/ubuntu%20wily-updates/main%20php5-curl
  • 知道了,谢谢大家。看来要升级了。感谢您的帮助。

标签: ubuntu curl


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-28
    • 1970-01-01
    • 2017-12-28
    • 2019-12-30
    • 2019-01-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多