[Risolto] Debian vedere se un pacchetto è installato

Sistemi operativi Linux e software open source
Rispondi
mafferri
Messaggi: 809
Iscritto il: martedì 10 gennaio 2012, 4:48

[Risolto] Debian vedere se un pacchetto è installato

Messaggio da mafferri »

Volevo vedere lo stato di alcuni pacchetti e qui , c'è l' howto di apt , però a me l'output è diverso -.-'

Codice: Seleziona tutto

root@debian:/var/log# cd /usr/bin
root@debian:/usr/bin# ls gcc*
gcc  gcc-4.1  gcc-4.3  gcc-4.4  gccbug-4.1
root@debian:/usr/bin# ls gcc* -al
lrwxrwxrwx 1 root root     16 11 mar 22.18 gcc -> /usr/bin/gcc-4.3
-rwxr-xr-x 1 root root 222472 11 apr  2010 gcc-4.1
-rwxr-xr-x 1 root root 239528 21 set  2010 gcc-4.3
-rwxr-xr-x 1 root root 255536 15 nov  2010 gcc-4.4
-rwxr-xr-x 1 root root  16288 11 apr  2010 gccbug-4.1
root@debian:/usr/bin# apt-cache show gcc-4.1
Package: gcc-4.1
Priority: optional
Section: devel
Installed-Size: 1108
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: amd64
Version: 4.1.2-29
Replaces: gcj-4.1 (<< 4.1.1), libssp0-dev (<< 4.1.1-6)
Provides: c-compiler, libssp0-dev
Depends: gcc-4.1-base (= 4.1.2-29), cpp-4.1 (= 4.1.2-29), binutils (>= 2.17cvs20070426), libgcc1 (>= 1:4.1.2-29), libc6 (>= 2.7)
Recommends: libc6-dev (>= 2.5)
Suggests: gcc-4.1-multilib, gcc-4.1-doc (>= 4.1.2-2), gcc-4.1-locales (>= 4.1.2-2), libmudflap0-dev (>= 4.1.2-29)
Conflicts: libssp0-dev (<< 4.1.1-6)
Filename: pool/main/g/gcc-4.1/gcc-4.1_4.1.2-29_amd64.deb
Size: 432444
MD5sum: b8c0dc612f6b7805115b687a2bc514fe
SHA1: bceceeaa8556e247bd55aa839bb39133a0ebd50f
SHA256: 2c20dc856109264a60e9e88928bb82f14cfb806ddd960244e7451d41cf38b86b
Description: The GNU C compiler
 This is the GNU C compiler, a fairly portable optimizing compiler for C.
Homepage: http://gcc.gnu.org/
Tag: devel::compiler, devel::lang:c, implemented-in::c, interface::commandline, role::program, suite::gnu, works-with::software:source

root@debian:/usr/bin# apt-cache show gcc-4.4
Package: gcc-4.4
Priority: optional
Section: devel
Installed-Size: 4396
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: amd64
Version: 4.4.5-8
Provides: c-compiler
Depends: gcc-4.4-base (= 4.4.5-8), cpp-4.4 (= 4.4.5-8), binutils (>= 2.20.1-15~), libgcc1 (>= 1:4.4.5-8), libgomp1 (>= 4.4.5-8), libc6 (>= 2.11)
Recommends: libc6-dev (>= 2.5)
Suggests: gcc-4.4-multilib, libmudflap0-4.4-dev (>= 4.4.5-8), gcc-4.4-doc (>= 4.4.4-17), gcc-4.4-locales (>= 4.4.4-17), libgcc1-dbg, libgomp1-dbg, libmudflap0-dbg, libcloog-ppl0 (>= 0.15.9-2~), libppl-c2, libppl7
Filename: pool/main/g/gcc-4.4/gcc-4.4_4.4.5-8_amd64.deb
Size: 2688272
MD5sum: eeeab2508592cb03d189bb67af47e19c
SHA1: c87b8730ee3ac15ccf95a81f48a99af2e1d444b6
SHA256: 81b0058880837dfec91f79f5a09830e203b5ee32d6995e615eb315f3ca19a341
Description: The GNU C compiler
 This is the GNU C compiler, a fairly portable optimizing compiler for C.
Homepage: http://gcc.gnu.org/
Tag: devel::compiler, devel::lang:c, implemented-in::c, interface::commandline, role::program, scope::utility, suite::gnu, works-with::software:source

root@debian:/usr/bin#

Avatar utente
magooz
Messaggi: 717
Iscritto il: sabato 9 febbraio 2013, 10:49
Località: Copertino (LE)

Re: Debian vedere se un pacchetto è installato

Messaggio da magooz »

Se ti interessa sapere solo se un determinato pacchetto è installato o meno, senza avere tutto sto popò di roba, puoi usare dpkg. Nel tuo caso dovrebbe essere sufficiente un semplice:

Codice: Seleziona tutto

# dpkg -l gcc*
GNU/Linux User # 402007
Immagine
Heaven is where the police are British, the chefs Italian, the mechanics German, the lovers French and is is all organized by the Swiss.
Hell is where the police are German, the chefs British, the mechanics French, the lovers Swiss and it is all organized by the Italians.

mafferri
Messaggi: 809
Iscritto il: martedì 10 gennaio 2012, 4:48

Re: Debian vedere se un pacchetto è installato

Messaggio da mafferri »

Grazie mille ;)

Avatar utente
magooz
Messaggi: 717
Iscritto il: sabato 9 febbraio 2013, 10:49
Località: Copertino (LE)

Re: Debian vedere se un pacchetto è installato

Messaggio da magooz »

:ok:
GNU/Linux User # 402007
Immagine
Heaven is where the police are British, the chefs Italian, the mechanics German, the lovers French and is is all organized by the Swiss.
Hell is where the police are German, the chefs British, the mechanics French, the lovers Swiss and it is all organized by the Italians.

Rispondi