我正在考虑安装上个月在Debian个人电脑上发布的hylafax + 5.5.4版。
我检查了dpkg -l | grep "hylafax"
,发现当前版本是5.5.3。然后我检查apt-cache search hylafax
并看到包可用,但我看不到任何版本号。
如何找到apt-get
中可用的软件包版本?
答案 0 :(得分:242)
好的,我找到了。
apt-cache policy <package name>
将显示版本详细信息。
它还会显示当前安装的版本以及可安装的版本。
例如,apt-cache policy hylafax+
答案 1 :(得分:28)
<强> apt-cache policy <package-name>
强>
$ apt-cache policy redis-server
redis-server:
Installed: (none)
Candidate: 2:2.8.4-2
Version table:
2:2.8.4-2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
<强> apt-get install -s <package-name>
强>
$ apt-get install -s redis-server
NOTE: This is only a simulation!
apt-get needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libjemalloc1 redis-tools
The following NEW packages will be installed:
libjemalloc1 redis-server redis-tools
0 upgraded, 3 newly installed, 0 to remove and 3 not upgraded.
Inst libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64])
Inst redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])
Inst redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])
Conf libjemalloc1 (3.5.1-2 Ubuntu:14.04/trusty [amd64])
Conf redis-tools (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])
Conf redis-server (2:2.8.4-2 Ubuntu:14.04/trusty [amd64])
<强> apt-cache show <package-name>
强>
$ apt-cache show redis-server
Package: redis-server
Priority: optional
Section: universe/misc
Installed-Size: 744
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Chris Lamb <lamby@debian.org>
Architecture: amd64
Source: redis
Version: 2:2.8.4-2
Depends: libc6 (>= 2.14), libjemalloc1 (>= 2.1.1), redis-tools (= 2:2.8.4-2), adduser
Filename: pool/universe/r/redis/redis-server_2.8.4-2_amd64.deb
Size: 267446
MD5sum: 066f3ce93331b876b691df69d11b7e36
SHA1: f7ffbf228cc10aa6ff23ecc16f8c744928d7782e
SHA256: 2d273574f134dc0d8d10d41b5eab54114dfcf8b716bad4e6d04ad8452fe1627d
Description-en: Persistent key-value database with network interface
Redis is a key-value database in a similar vein to memcache but the dataset
is non-volatile. Redis additionally provides native support for atomically
manipulating and querying data structures such as lists and sets.
.
The dataset is stored entirely in memory and periodically flushed to disk.
Description-md5: 9160ed1405585ab844f8750a9305d33f
Homepage: http://redis.io/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubunt
<强> dpkg -l <package-name>
强>
$ dpkg -l nginx
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================================-=========================-=========================-=====================================================================================
ii nginx 1.6.2-1~trusty amd64 high performance web server
答案 2 :(得分:8)
04-Oct-2017 12:15:08.923 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8084"]
04-Oct-2017 12:15:08.952 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
04-Oct-2017 12:15:09.048 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8084"]
04-Oct-2017 12:15:09.049 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
04-Oct-2017 12:15:14.226 INFO [hz.client_0.cluster-] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [com.hazelcast.client.spi.impl.ClusterListenerSupport$1$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.hazelcast.client.spi.impl.ClusterListenerSupport$1$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1327)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1196)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at com.hazelcast.client.spi.impl.ClusterListenerSupport$1.run(ClusterListenerSupport.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)
Exception in thread "hz.client_0.cluster-" java.lang.IllegalStateException: Can't overwrite cause with java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.hazelcast.client.spi.impl.ClusterListenerSupport$1$1]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at java.lang.Throwable.initCause(Throwable.java:457)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1196)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at com.hazelcast.client.spi.impl.ClusterListenerSupport$1.run(ClusterListenerSupport.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.hazelcast.util.executor.HazelcastManagedThread.executeRun(HazelcastManagedThread.java:64)
at com.hazelcast.util.executor.HazelcastManagedThread.run(HazelcastManagedThread.java:80)
Caused by: java.lang.ClassNotFoundException
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1315)
... 8 more
简称
答案 3 :(得分:6)
答案 4 :(得分:5)
Linux Mint,Debian 9,Ubuntu 16.04和更早版本:
简短信息:
apt policy <package_name>
详细信息(包括描述和依赖)
apt show <package_name>
答案 5 :(得分:3)
此外, apt-show-versions 包(单独安装)会解析有关安装内容的dpkg信息,并告诉您包是否是最新的。
实施例..
$ sudo apt-show-versions --regex chrome
google-chrome-stable/stable upgradeable from 32.0.1700.102-1 to 35.0.1916.114-1
xserver-xorg-video-openchrome/quantal-security uptodate 1:0.3.1-0ubuntu1.12.10.1
$
答案 6 :(得分:2)
关于debian:
apt list --upgradable
给出包含包,要升级的版本以及包的实际版本的列表。
结果:
base-files/stable 8+deb8u8 amd64 [upgradable from: 8+deb8u7]
bind9-host/stable 1:9.9.5.dfsg-9+deb8u11 amd64 [upgradable from: 1:9.9.5.dfsg-9+deb8u9]
ca-certificates/stable 20141019+deb8u3 all [upgradable from: 20141019+deb8u2]
certbot/jessie-backports 0.10.2-1~bpo8+1 all [upgradable from: 0.8.1-2~bpo8+1]
dnsutils/stable 1:9.9.5.dfsg-9+deb8u11 amd64 [upgradable from: 1:9.9.5.dfsg-9+deb8u9]
答案 7 :(得分:1)
正如在其他地方发布的那样,这也有效:
apt-cache madison <package_name>
答案 8 :(得分:1)
另外,根据手册页:
apt-cache showpkg <package_name>
也可用于:
...显示有关命令行中列出的软件包的信息。包含剩余的参数 名。列出了每个包的可用版本和反向依赖关系,以及转发 每个版本的依赖关系。前向(正常)依赖项是包中的那些包 问题取决于;反向依赖性是依赖于所讨论的包的那些包。从而, 必须满足包的前向依赖性,但反向依赖性不必是。
例如:
apt-cache policy conky
conky:
Installed: (none)
Candidate: 1.10.3-1
Version table:
1.10.3-1 500
500 http://us.archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu yakkety/universe i386 Packages
答案 9 :(得分:0)
您还可以简单地执行常规的 apt-get update
,然后按照手册进行:
apt-get -V upgrade
-V显示详细的版本号
将向您显示当前软件包与将以类似于下面的格式升级的软件包:
~# sudo apt-get -V upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
curl (7.38.0-4+deb8u14 => 7.38.0-4+deb8u15)
php5 (5.6.40+dfsg-0+deb8u2 => 5.6.40+dfsg-0+deb8u3)
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.0 MB of archives.
After this operation, 567 kB of additional disk space will be used.
Do you want to continue? [Y/n]