我只是在玩 Ubuntu 14.04.1 LTS。我安装了 emacs,并想仔细检查它是否是。
~ 1496 $ dpkg --status emacs
dpkg-query: package 'emacs' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
~ 1497 $ apt-cache show emacs
Package: emacs
Priority: optional
Section: editors
Installed-Size: 25
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Rob Browning <[email protected]>
Architecture: all
Source: emacs-defaults
Version: 45.0ubuntu1
Depends: emacs24 | emacs24-lucid | emacs24-nox
Filename: pool/main/e/emacs-defaults/emacs_45.0ubuntu1_all.deb
Size: 1624
MD5sum: 2648ac76d7058d4a722ae304e474aa06
SHA1: 6667aaf3b043b44f10271b943dbb9dbb9620dbf2
SHA256: cb9185c543841971a754ebf8c6a35396c865171532b407dce5b5447c41cfa232
Description-en: GNU Emacs editor (metapackage)
GNU Emacs is the extensible self-documenting text editor.
This is a metapackage that will always depend on the latest
recommended Emacs release.
Description-md5: 21fb7da111336097a2378959f6d6e6a8
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
现在它似乎已安装,但我仍然很困惑为什么第一个命令显示“emacs 未安装......”。
答案1
你写了:
现在好像已经安装好了
您是否emacs
通过查看 的输出来断定该软件包已安装apt-cache show
?如果是这样,那就不正确了。apt-cache show
对于任何软件包(无论是否安装)都会给出类似的输出。特别是,
Installed-Size: ...
[...]
Size: 1624
无论是否安装该软件包都会显示。
答案2
我怀疑您安装的是该emacs24
软件包而不是emacs
元软件包。检查:
dpkg --status emacs24
该命令的输出也可能会带来一些启发:
dpkg -l | grep '^ii.*emacs'