See What Version of a Package Is Installed on Ubuntu Zobacz jaka wersja pakiet jest instalowany w Ubuntu
The package management system on Ubuntu makes it extremely simple to install and remove packages, but sometimes it's important to figure out what version of a particular package that you actually have installed. System zarządzania pakietami w Ubuntu sprawia, że niezwykle prosty w instalacji i usuwania pakietów, ale czasami ważne jest, aby dowiedzieć się, jaka wersja danego pakietu, który faktycznie został zainstalowany.
The apt-get utilities are simply a front-end to the debian dpkg utility, which actually does the real work. Apt-get narzędzi są po prostu front-end do ± programu dpkg, które faktycznie nie prawdziwa praca. You can use this utility to figure out what version is installed. Możesz użyć tego narzędzia, aby dowiedzieć się, jaka wersja jest zainstalowana.
dpkg -s <packagename> dpkg-s <packagename>
Here's an example, where I was trying to figure out what version of Ruby I had installed on my system: Oto przykład, gdy próbowałem dowiedzieć się, co wersja Ruby miałem zainstalowane na moim komputerze:
geek@ubuntuServ:~$ dpkg -s ruby1.8 geek @ ubuntuServ: ~ $ dpkg-s ruby1.8
Package: ruby1.8 Opakowanie: ruby1.8
Status: install ok installed Status: install ok installed
Priority: optional Priority: optional
Section: interpreters Dział: Tłumacze
Installed-Size: 272 Installed-Size: 272
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com> Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Architecture: i386 Architecture: i386
Version: 1.8.4-5ubuntu1.2 Wersja: 1.8.4-5ubuntu1.2
Depends: libc6 (>= 2.4-1), libruby1.8 (>= 1.8.4) Depends: libc6 (> = 2.4-1), libruby1.8 (> = 1.8.4)
Suggests: ruby1.8-examples, rdoc1.8, ri1.8 Proponuje: ruby1.8 przykłady, rdoc1.8, ri1.8
Description: Interpreter of object-oriented scripting language Ruby 1.8 Opis: Tłumacze obiektowych języków skryptowych Ruby 1.8
Ruby is the interpreted scripting language for quick and easy Ruby to interpretowany język skryptowy na szybkie i łatwe
object-oriented programming. programowania obiektowego. It has many features to process text Posiada on wiele funkcji przetwarzania tekstu
files and to do system management tasks (as in perl). plików i wykonywanie zadań zarządzania systemem (jak w Perlu). It is simple, Jest to proste,
straight-forward, and extensible. prosta i rozszerzalny.
. .
This package provides version 1.8 series of Ruby. Ten pakiet zawiera wersję 1.8 serii Ruby.
. .
On Debian, Ruby 1.8 is provided as separate packages. W systemie Debian, Ruby 1.8 oferowane jest jako osobne pakiety. You can get Możesz dostać
full Ruby 1.8 distribution by installing following packages. pełny Ruby 1.8 dystrybucji poprzez zainstalowanie następujących pakietów.
. .
ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp
ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8 ruby1.8-libdbm przykłady-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8
libopenssl-ruby1.8 libreadline-ruby1.8 libopenssl-ruby1.8 libreadline-ruby1.8
Original-Maintainer: akira yamada <akira@debian.org> Original-Maintainer: Yamada Akira <akira@debian.org>
You can see that I've got version 1.8.4 installed. Możesz zobaczyć, że mam zainstalowane w wersji 1.8.4.

Daily Email Updates Daily Email Updates
You can get our how-to articles in your inbox each day for free. Możesz pobrać nasze instrukcje postępowania w skrzynce odbiorczej codziennie za darmo. Just enter your name and email below: Wystarczy podać swoje imię i adres e-mail:



apt-show-versions is a gem of a tool apt-show-versions to klejnot narzędzia
(you need to sudo apt-get install apt-show-versions) (musisz sudo apt-get install apt-show-versions)
apt-show-versions -a apt-show-versions -
lists all available versions on the apt repository servers (aswell as the installed version, if there is one) lista wszystkich dostępnych wersjach apt serwerów stron (jak również zainstalowaną wersję, jeśli istnieje)
This is occasionally very useful To jest czasem bardzo przydatne
The previous comment was supposed to show the example as: Poprzedni komentarz miał pokazać np. jak:
apt-show-versions -a <packagename> apt-show-versions-<packagename>
I hope that works better!! Mam nadzieję, że działa lepiej! Wot no preview?! Wot bez podglądu?!
that's better. that's better. Here's what the output looks like Oto, co wygląda jak wyjście
amir@amir-desktop:~$ @ amir amir-desktop: ~ $ apt-show-versions -a ruby apt-show-versions-ruby
ruby 1.8.2-1 install ok installed Ruby 1.8.2-1 install ok installed
No stable version Brak stabilnej wersji
ruby 1.8.2-1 dapper Ruby 1.8.2-1 dapper
ruby/dapper uptodate 1.8.2-1 Ruby / dapper aktualne 1.8.2-1
dpkg is also a good option, especially if you don't know the exact package name dpkg jest również dobrym rozwiązaniem, zwłaszcza jeśli nie znamy dokładnej nazwy pakietu
:~$ dpkg -l : ~ $ Dpkg-l
or in combination with grep lub w połączeniu z grep
:~$ dpkg -l | grep ruby : ~ $ Dpkg-l | grep ruby
or if you expecting a lot of matches lub jeśli spodziewa się wiele meczów
:~$ dpkg -l | grep lib | less : ~ $ Dpkg-l | grep lib | less
you can also use regular expression patterns with grep Możesz także skorzystać z wzorów wypowiedzi z grep