代码之家  ›  专栏  ›  技术社区  ›  Slava Mokerov

apt get中的无限加载包,无限get

  •  0
  • Slava Mokerov  · 技术社区  · 7 年前

    Ubuntu 16.04.3 xenial

    apt-get update

    ...
    Get:10 http://ru.archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
    Get:10 http://ru.archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
    Get:10 http://ru.archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
    ...
    

    我更改了文件中镜像的地址 /etc/apt/sources.list

    问题不是这样的: https://askubuntu.com/questions/774918/apt-get-is-stuck-at-fetched-xxkb-in-xxsec

    发生什么事?

    2 回复  |  直到 7 年前
        1
  •  0
  •   TheDevWay    7 年前

    Ubuntu软件包中PHP的默认版本现在是7,安装时无需提及该版本 php7.0 .

    尝试清除关于php7的所有内容,然后安装php,不要提及版本。

    sudo ):

    apt-get remove php7.0-*
    apt-get --purge remove php7.0
    apt-get --autoremove
    apt-get --autoclean
    

    ls /etc/php
    

    然后只需安装php而不提及版本,它将安装php7的最新版本(使用 ):

    apt-get update
    apt-get install php
    

    ):

    apt-get install php-json
    

    P、 S:如果这不起作用,请尝试将Ubuntu存储库镜像更改为另一个国家的CDN,如下图所示,然后重试(使用 ):

    nano /etc/apt/sources.list 
    

    然后更改所有 ru de .

    然后保存文件并重试。

        2
  •  0
  •   Slava Mokerov    7 年前

    帮助回答: https://askubuntu.com/a/964096/746294

    如果您使用的是任何(透明)代理服务器,则可能是 这些问题。

    如何验证数据包是否被剪切:

    curl http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-i386/by-hash/SHA256/504313460a80c8d83fe8a45d2958284e5255ba0776b3e729074c8f8a7368d191 > /dev/null
    

    curl ,上面写着 软件包未下载

      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
      0 7335k    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    curl: (18) transfer closed with 7512036 bytes remaining to read
    

    有必要配置代理服务器。

    /etc/apt/sources.list 超文本传输协议 HTTPS http://ru.archive.ubuntu.com 替换为 https://mirror.yandex.ru