我有一个用于安装的 deb 包。
我应该通过dpkg -i my.deb,还是通过 apt安装?
两者都能很好地处理软件依赖问题吗?
如果通过 apt,我如何通过 apt 从 deb 安装?
在我安装软件包之前,我想知道我会得到什么版本。
在使用apt-get或aptitude在 Debian 或 Ubuntu 上安装之前,如何检查版本?
众所周知,apt-get具有超级牛的力量,aptitude但不:
$ apt-get --help | grep -i cow
                       This APT has Super Cow Powers.
$ aptitude --help | grep -i cow
                  This aptitude does not have Super Cow Powers.
Run Code Online (Sandbox Code Playgroud)
当然,APT 有一个复活节彩蛋来搭配它:
$ apt-get moo
         (__) 
         (oo) 
   /------\/ 
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...
Run Code Online (Sandbox Code Playgroud)
我很好奇,这个复活节彩蛋背后有什么故事吗?它的历史是什么?我知道它已经在 apt 中使用了很长时间——从旧 Debian 版本中的 apt 源的快速 grep 中,它在 Debian 2.2(土豆;apt 0.3.19)和 Debian 3.0(woody;apt 0.5.4)之间的某个时间获得了它。
编辑:根据Debian-Devel 邮件列表上Jacob Kuntz的消息,它于 2001 年 2 月在 apt …
如果我的包有更新,我希望我的 cron-run 报告脚本通知我。有没有办法让apt-get我提供可用更新的列表,但不要再做任何事情?
我知道,无论apt-get和aptitude是Debian的命令行包管理界面的Linux衍生,用不同的选择,但我还是有点困惑。在幕后,他们不是使用相同的 APT 系统吗?  
我工作的 ISP 正在建立一个内部 IPv6 网络,为最终连接到 IPv6 互联网做准备。因此,该网络中的一些服务器在运行时默认尝试通过其 IPv6 地址连接到 security.debian.org apt-get update,这导致每当我下载任何类型的更新时都必须等待很长时间.  
有没有办法告诉 apt 是更喜欢 IPv4 还是完全忽略 IPv6?
我刚刚用 Ubuntu Oneiric 11.10 设置了一台新机器,然后运行
apt-get update
apt-get upgrade
apt-get install git
Run Code Online (Sandbox Code Playgroud)
现在如果我运行git --version它告诉我我有git version 1.7.5.4但在我的本地机器上我有更新的git version 1.7.9.2
我知道我可以从源代码安装以获得最新版本,但我认为尽可能多地使用包管理器来保持一切标准化是一个好主意。
那么是否可以使用apt-get来获取更新版本的git,正确的方法是什么?
在 Ubuntu 中,可以通过以下命令添加存储库 -
sudo add-apt-repository ppa:yannubuntu/boot-repair
Run Code Online (Sandbox Code Playgroud)
由于 Ubuntu 是基于 Debian 代码库的,我原以为它也能在 Debian 中运行,但事实并非如此。
注意:我知道我可以编辑/etc/apt/sources.list,但我想从 shell 实现这一点。我还想知道为什么当代码库相同时相同的命令不起作用。
我想运行此命令的相反操作以删除 Debian 8.1 中的不兼容存储库
sudo add-apt-repository -y ppa:nemh/systemback
Run Code Online (Sandbox Code Playgroud)
命令add-apt-repository在包中的位置software-properties-common。我在 中找不到systemback条目/etc/apt/sources.list。
你怎么能运行相反的命令?
我正在尝试部署 django 应用程序。当我打印时, 
apt-get update
我看到
W: Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list.d/ - DirectoryExists (13: Permission denied)
W: Unable to read /etc/apt/sources.list - RealFileExists (13: Permission denied)
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Unable to read /var/cache/apt/ - opendir (13: Permission denied)
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: …Run Code Online (Sandbox Code Playgroud)