apt 安装,Deb包安装和aptitude安装解决依赖性问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apt 安装,Deb包安装和aptitude安装解决依赖性问题相关的知识,希望对你有一定的参考价值。
参考技术A 本文部分资料来源,在此对作者表示感谢!aptitude 命令详解
依赖: XXX 但是它将不会被安装
Ubuntu 16.04 安装程序的三种方式
此时便可以使用
常用命令
APT(Advanced Packaging Tool)是Debian/Ubuntu类Liunx系统中的软件包管理程序, 使用它可以找到想要的软件包, 而且安装、卸载、更新都很简便;也可以用来对Ubuntu进行升级; APT的源文件为/etc/apt/目录下的sources.list文件.
APT常用命令包括:
Apt下载安装包时Hash校验和不符
经过搜索与文档查阅,找到了解决方法:在目录/etc/apt/apt.conf.d
下创建文件99FixHashCheckSumError
,其中包含如下内容。
Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
之后,再运行apt-get
或aptitude
则一切正常。需要说明的是,虽然网上有人提到还应加入Acquire::BrokenProxy true;
,但是该配置选项并未被apt.conf
的文档提及。
参考apt.conf
的man
说明和RFC 2616,以上各配置条目的含义摘录如下:
-
Acquire::http::Pipeline-Depth
can be used to enable HTTP pipelining (RFC 2616 section 8.1.2.2) which can be beneficial e.g. on high-latency connections. It specifies how many requests are sent in a pipeline. APT tries to detect and workaround misbehaving webservers and proxies at runtime, but if you know that yours does not conform to the HTTP/1.1 specification pipelining can be disabled by setting the value to 0. It is enabled by default with the value 10.RFC 2616 8.1.2.2 Pipelining
A client that supports persistent connections MAY "pipeline" its requests (i.e., send multiple requests without waiting for each response). A server MUST send its responses to those requests in the same order that the requests were received.
Clients which assume persistent connections and pipeline immediately after connection establishment SHOULD be prepared to retry their connection if the first pipelined attempt fails. If a client does such a retry, it MUST NOT pipeline before it knows the connection is persistent. Clients MUST also be prepared to resend their requests if the server closes the connection before sending all of the corresponding responses.
Clients SHOULD NOT pipeline requests using non-idempotent methods or non-idempotent sequences of methods (see section 9.1.2). Otherwise, a premature termination of the transport connection could lead to indeterminate results. A client wishing to send a non-idempotent request SHOULD wait to send that request until it has received the response status for the previous request.
-
Acquire::http::No-Cache
tells the proxy not to use its cached response under any circumstances.
以上是关于apt 安装,Deb包安装和aptitude安装解决依赖性问题的主要内容,如果未能解决你的问题,请参考以下文章