如果我为未安装的程序键入命令,我可能会收到如下消息:
[user]~$ program
The program 'program' is currently not installed. You can install it by typing:
sudo apt-get install program
[user]~$
Run Code Online (Sandbox Code Playgroud)
是否有我可以输入的键盘快捷键或命令,sudo apt-get install program无需我自己输入即可执行?
我在终端中输入了以下内容
$ musique
The program 'musique' is currently not installed. You can install it by typing:
sudo apt-get install musique
Run Code Online (Sandbox Code Playgroud)
所以Ubuntu知道“musique”是一个程序,尽管它目前没有安装在机器上。但是,如果我输入
$ musiquez
No command 'musiquez' found, did you mean:
Command 'musique' from package 'musique' (universe)
Run Code Online (Sandbox Code Playgroud)
它知道没有这样的程序叫做“musiquez”。
我的问题是,Ubuntu 是如何知道这一点的?这些关于可以在 Ubuntu 上安装哪些应用程序的信息存储在哪里?
我刚刚将我的 Ubuntu 桌面 10.10 升级到 11.04。我一切正常,除非尝试将当前的 R 2.12.1 更新到 R 2.13.0。
我按照自述文件:
并添加
deb http://cran.xl-mirror.nl/bin/Linux/Ubuntu natty/
deb-src http://cran.xl-mirror.nl/bin/Linux/Ubuntu natty/
deb http://nl.archive.Ubuntu.com/Ubuntu/ natty-backports restricted main multiverse universe
Run Code Online (Sandbox Code Playgroud)
给我的
/etc/apt/sources.list
并且还添加了
CRAN 上的 Ubuntu 档案使用“Michael Rutter”的密钥签名,密钥 ID 为 E084DAB9。您可以使用
gpg --keyserver keyserver.Ubuntu.com --recv-key E084DAB9
Run Code Online (Sandbox Code Playgroud)
然后将其提供给 apt-key
gpg -a --export E084DAB9 | sudo apt-key add -
Run Code Online (Sandbox Code Playgroud)
它出现在突触包管理器中(所以我认为它有效)。
但是在运行时sudo apt-get update我收到一条错误消息:
阅读包裹清单...错误!
E: 遇到没有包的部分: 标题 E: MergeList 有问题 /var/lib/apt/lists/cran.xl-mirror.nl_bin_linux_ubuntu_natty_en E: 包列表或状态文件无法解析或打开。E: _cache->open() 失败,请报告。
和
初始化包信息时出现无法解决的问题。
请针对“update-manager”包报告此错误,并包含以下错误消息:
'E:Encountered a section with no …
我正在使用 Ubuntu 10.04 LTS。我正在考虑使用 git 作为个人项目的源代码控制和 Github 作为远程存储库。我在向远程 github 存储库推送提交时遇到问题,收到以下错误消息:
The requested URL returned error: 403 while accessing https://github.com/Jstall/helloworld.git/info/refs
Run Code Online (Sandbox Code Playgroud)
当我进行一些挖掘时,我发现问题可能是我没有最新版本的 Git。当我做一个 --version 时,我发现我在version 1.7.0.4本地有。所以我尝试使用以下方法更新 git:
sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)
但得到以下错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package git has no installation candidate …Run Code Online (Sandbox Code Playgroud) 如果在完成下载和安装软件包后 出现此错误消息,出现了什么问题apt-get?
...
Processing triggers for menu ...
Error: Timeout was reached
Run Code Online (Sandbox Code Playgroud)
这是在 Debian Wheezy/Sid 上。
示例(使用 Debian Wheezy):
sudo apt-get source hello
Run Code Online (Sandbox Code Playgroud)
结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 705 kB of source archives.
Get:1 http://ftp.us.debian.org/debian/ testing/main hello 2.8-3 (dsc) [1287 B]
Get:2 http://ftp.us.debian.org/debian/ testing/main hello 2.8-3 (tar) [697 kB]
Get:3 http://ftp.us.debian.org/debian/ testing/main hello 2.8-3 (diff) [6598 B]
Fetched 705 kB in 8s (80.6 kB/s)
gpgv: keyblock resource `/root/.gnupg/trustedkeys.gpg': file open error
gpgv: Signature made Wed Feb 13 10:30:20 2013 UTC using RSA key ID 9F1B8B32
gpgv: …Run Code Online (Sandbox Code Playgroud) 这个问题经常出现在我身上,谷歌和手册页都没有帮助我解决它。问题是,我怎样才能让 apt-get 或他的朋友(apt-file 或 apt-cache)给我一个给定包安装的文件列表?假设我刚刚安装了 ivy,我想找到 .jar,它一定是随附的。locate ivy将返回很多关于 kivy 和其他类似命名的包/文件的信息。同样的问题apt-file list。apt-cache show也不会太有用——它提供了很多关于包的信息,但没有关于它的文件的信息。
我最近发现我们可以使用更近的apt install, remove... 在祖先apt-get install. 我以前不知道。因为我有一些脚本可以安装跨各种操作系统的软件包,我想知道什么时候apt install可以在 Debian 和 Ubuntu 中使用?
反之亦然?
例如在 Gentoo 上安装 apt-get 并连接 Ubuntu 的存储库。
如果可能,我该怎么做?(至少在一般情况下)
apt-get ×10
ubuntu ×4
debian ×3
packages ×2
apt ×1
command-line ×1
dpkg ×1
gentoo ×1
git ×1
linux ×1
portage ×1
r ×1
repository ×1
ubuntu-10.04 ×1
ubuntu-11.04 ×1
updates ×1
verification ×1