Dernière mise-à-jour : 2020/01/30 03:27
Historiquement il était nécessaire d'installer un logiciel à partir de ses fichiers sources.
Pour comprendre ce qui est la compilation d'un logiciel, commencez par télécharger le logiciel hello :
root@ubuntu:~# wget http://www.linuxelearning.com/downloads/file/hello-2.1.1.tar.gz --2014-10-02 15:14:15-- http://www.linuxelearning.com/downloads/file/hello-2.1.1.tar.gz Résolution de www.linuxelearning.com (www.linuxelearning.com)... 88.173.201.50 Connexion vers www.linuxelearning.com (www.linuxelearning.com)|88.173.201.50|:80... connecté. requête HTTP transmise, en attente de la réponse... 200 OK Taille : 389363 (380K) [application/x-gzip] Enregistre : «hello-2.1.1.tar.gz» 100%[======================================================================================================>] 389 363 123KB/s ds 3,1s 2014-10-02 15:14:18 (123 KB/s) - «hello-2.1.1.tar.gz» enregistré [389363/389363]
Ensuite désarchivez le logiciel :
root@ubuntu:~# tar xvf hello-2.1.1.tar.gz hello-2.1.1/ hello-2.1.1/intl/ hello-2.1.1/intl/ChangeLog hello-2.1.1/intl/Makefile.in hello-2.1.1/intl/config.charset hello-2.1.1/intl/locale.alias hello-2.1.1/intl/ref-add.sin hello-2.1.1/intl/ref-del.sin hello-2.1.1/intl/gmo.h hello-2.1.1/intl/gettextP.h hello-2.1.1/intl/hash-string.h hello-2.1.1/intl/plural-exp.h hello-2.1.1/intl/eval-plural.h hello-2.1.1/intl/os2compat.h hello-2.1.1/intl/libgnuintl.h hello-2.1.1/intl/loadinfo.h hello-2.1.1/intl/bindtextdom.c hello-2.1.1/intl/dcgettext.c hello-2.1.1/intl/dgettext.c hello-2.1.1/intl/gettext.c hello-2.1.1/intl/finddomain.c hello-2.1.1/intl/loadmsgcat.c hello-2.1.1/intl/localealias.c hello-2.1.1/intl/textdomain.c hello-2.1.1/intl/l10nflist.c hello-2.1.1/intl/explodename.c hello-2.1.1/intl/dcigettext.c hello-2.1.1/intl/dcngettext.c hello-2.1.1/intl/dngettext.c hello-2.1.1/intl/ngettext.c hello-2.1.1/intl/plural.y hello-2.1.1/intl/plural-exp.c hello-2.1.1/intl/localcharset.c hello-2.1.1/intl/localename.c hello-2.1.1/intl/osdep.c hello-2.1.1/intl/os2compat.c hello-2.1.1/intl/intl-compat.c hello-2.1.1/intl/plural.c hello-2.1.1/intl/VERSION hello-2.1.1/po/ hello-2.1.1/po/Makefile.in.in hello-2.1.1/po/Makevars hello-2.1.1/po/remove-potcdate.sin hello-2.1.1/po/quot.sed hello-2.1.1/po/boldquot.sed hello-2.1.1/po/en@quot.header hello-2.1.1/po/en@boldquot.header hello-2.1.1/po/insert-header.sin hello-2.1.1/po/Rules-quot hello-2.1.1/po/POTFILES.in hello-2.1.1/po/hello.pot hello-2.1.1/po/ca.po hello-2.1.1/po/da.po hello-2.1.1/po/de.po hello-2.1.1/po/de_DE.po hello-2.1.1/po/el.po hello-2.1.1/po/eo.po hello-2.1.1/po/es.po hello-2.1.1/po/et.po hello-2.1.1/po/fi.po hello-2.1.1/po/fr.po hello-2.1.1/po/gl.po hello-2.1.1/po/he.po hello-2.1.1/po/hr.po hello-2.1.1/po/hu.po hello-2.1.1/po/id.po hello-2.1.1/po/it.po hello-2.1.1/po/ja.po hello-2.1.1/po/ko.po hello-2.1.1/po/lv.po hello-2.1.1/po/nb.po hello-2.1.1/po/nl.po hello-2.1.1/po/nn.po hello-2.1.1/po/pl.po hello-2.1.1/po/pt.po hello-2.1.1/po/pt_BR.po hello-2.1.1/po/ru.po hello-2.1.1/po/sk.po hello-2.1.1/po/sl.po hello-2.1.1/po/sv.po hello-2.1.1/po/tr.po hello-2.1.1/po/uk.po hello-2.1.1/po/ca.gmo hello-2.1.1/po/da.gmo hello-2.1.1/po/de.gmo hello-2.1.1/po/de_DE.gmo hello-2.1.1/po/el.gmo hello-2.1.1/po/eo.gmo hello-2.1.1/po/es.gmo hello-2.1.1/po/et.gmo hello-2.1.1/po/fi.gmo hello-2.1.1/po/fr.gmo hello-2.1.1/po/gl.gmo hello-2.1.1/po/he.gmo hello-2.1.1/po/hr.gmo hello-2.1.1/po/hu.gmo hello-2.1.1/po/id.gmo hello-2.1.1/po/it.gmo hello-2.1.1/po/ja.gmo hello-2.1.1/po/ko.gmo hello-2.1.1/po/lv.gmo hello-2.1.1/po/nb.gmo hello-2.1.1/po/nl.gmo hello-2.1.1/po/nn.gmo hello-2.1.1/po/pl.gmo hello-2.1.1/po/pt.gmo hello-2.1.1/po/pt_BR.gmo hello-2.1.1/po/ru.gmo hello-2.1.1/po/sk.gmo hello-2.1.1/po/sl.gmo hello-2.1.1/po/sv.gmo hello-2.1.1/po/tr.gmo hello-2.1.1/po/uk.gmo hello-2.1.1/po/ChangeLog hello-2.1.1/po/LINGUAS hello-2.1.1/README hello-2.1.1/ABOUT-NLS hello-2.1.1/AUTHORS hello-2.1.1/COPYING hello-2.1.1/ChangeLog hello-2.1.1/INSTALL hello-2.1.1/Makefile.am hello-2.1.1/Makefile.in hello-2.1.1/NEWS hello-2.1.1/THANKS hello-2.1.1/TODO hello-2.1.1/aclocal.m4 hello-2.1.1/config.guess hello-2.1.1/config.h.in hello-2.1.1/config.rpath hello-2.1.1/config.sub hello-2.1.1/configure hello-2.1.1/configure.ac hello-2.1.1/depcomp hello-2.1.1/install-sh hello-2.1.1/missing hello-2.1.1/mkinstalldirs hello-2.1.1/BUGS hello-2.1.1/ChangeLog.O hello-2.1.1/contrib/ hello-2.1.1/contrib/ChangeLog hello-2.1.1/contrib/Makefile.am hello-2.1.1/contrib/Makefile.in hello-2.1.1/contrib/de_franconian_po.txt hello-2.1.1/contrib/evolution.txt hello-2.1.1/contrib/hello.1 hello-2.1.1/doc/ hello-2.1.1/doc/gpl.texi hello-2.1.1/doc/ChangeLog hello-2.1.1/doc/Makefile.am hello-2.1.1/doc/Makefile.in hello-2.1.1/doc/mdate-sh hello-2.1.1/doc/stamp-vti hello-2.1.1/doc/texinfo.tex hello-2.1.1/doc/version.texi hello-2.1.1/doc/hello.texi hello-2.1.1/doc/hello.info hello-2.1.1/src/ hello-2.1.1/src/ChangeLog hello-2.1.1/src/Makefile.am hello-2.1.1/src/Makefile.in hello-2.1.1/src/alloca.c hello-2.1.1/src/hello.c hello-2.1.1/src/version.c hello-2.1.1/src/getopt.c hello-2.1.1/src/getopt1.c hello-2.1.1/src/getopt.h hello-2.1.1/src/system.h hello-2.1.1/man/ hello-2.1.1/man/ChangeLog hello-2.1.1/man/Makefile.am hello-2.1.1/man/Makefile.in hello-2.1.1/man/hello.1 hello-2.1.1/man/help2man hello-2.1.1/m4/ hello-2.1.1/m4/README hello-2.1.1/m4/ChangeLog hello-2.1.1/m4/Makefile.am hello-2.1.1/m4/Makefile.in hello-2.1.1/m4/codeset.m4 hello-2.1.1/m4/gettext.m4 hello-2.1.1/m4/glibc21.m4 hello-2.1.1/m4/iconv.m4 hello-2.1.1/m4/isc-posix.m4 hello-2.1.1/m4/lcmessage.m4 hello-2.1.1/m4/lib-ld.m4 hello-2.1.1/m4/lib-link.m4 hello-2.1.1/m4/lib-prefix.m4 hello-2.1.1/m4/progtest.m4 hello-2.1.1/tests/ hello-2.1.1/tests/ChangeLog hello-2.1.1/tests/Makefile.am hello-2.1.1/tests/Makefile.in hello-2.1.1/tests/hello-1 hello-2.1.1/tests/world-1 hello-2.1.1/tests/nothing-1
Changez de répertoire :
root@ubuntu:~# cd hello-2.1.1/
A l'étude du fichier README, celui-ci nous renvoie vers le fichier INSTALL. Visualisez donc ce dernier :
root@ubuntu:~/hello-2.1.1# more INSTALL Copyright 1994, 1995, 1996, 1999, 2000, 2001 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is --More--(10%)
La procédure expliquée est celle utilisée pour la plupart des installations manuelles, à savoir la saisie des quatre commandes suivantes.
configure est un script chargé de créer les makefiles pour une architecture donnée. Les makefiles sont lus par la commande make.
root@ubuntu:~/hello-2.1.1# ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets ${MAKE}... yes checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking for strerror in -lcposix... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for string.h... (cached) yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for working alloca.h... yes checking for alloca... yes checking for struct stat.st_blksize... yes checking for msgfmt... no checking for gmsgfmt... : checking for xgettext... no checking for msgmerge... no checking build system type... i686-pc-linux checking host system type... i686-pc-linux checking for ranlib... ranlib checking for gcc option to accept ANSI C... none needed checking for an ANSI C-conforming const... yes checking for inline... inline checking for off_t... yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for getpagesize... yes checking for working mmap... yes checking whether we are using the GNU C Library 2.1 or newer... yes checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for iconv... yes checking argz.h usability... yes checking argz.h presence... yes checking for argz.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking nl_types.h usability... yes checking nl_types.h presence... yes checking for nl_types.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... (cached) yes checking for feof_unlocked... yes checking for fgets_unlocked... yes checking for getc_unlocked... yes checking for getcwd... yes checking for getegid... yes checking for geteuid... yes checking for getgid... yes checking for getuid... yes checking for mempcpy... yes checking for munmap... yes checking for putenv... yes checking for setenv... yes checking for setlocale... yes checking for stpcpy... yes checking for strcasecmp... yes checking for strdup... yes checking for strtoul... yes checking for tsearch... yes checking for __argz_count... yes checking for __argz_stringify... yes checking for __argz_next... yes checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for nl_langinfo and CODESET... yes checking for LC_MESSAGES... yes checking for bison... no checking whether NLS is requested... yes checking whether included gettext is requested... no checking for GNU gettext in libc... yes checking for perl... perl configure: creating ./config.status config.status: creating Makefile config.status: creating contrib/Makefile config.status: creating doc/Makefile config.status: creating intl/Makefile config.status: creating man/Makefile config.status: creating po/Makefile.in config.status: creating m4/Makefile config.status: creating src/Makefile config.status: creating tests/Makefile config.status: creating config.h config.status: executing depfiles commands config.status: executing default-1 commands config.status: creating po/POTFILES config.status: creating po/Makefile config.status: executing default commands
make sert à appeler des commandes créant des fichiers nécessaires à l'installation du logiciel.
root@ubuntu:~/hello-2.1.1# make make all-recursive make[1]: entrant dans le répertoire « /root/hello-2.1.1 » Making all in contrib make[2]: entrant dans le répertoire « /root/hello-2.1.1/contrib » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/contrib » Making all in doc make[2]: entrant dans le répertoire « /root/hello-2.1.1/doc » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/doc » Making all in intl make[2]: entrant dans le répertoire « /root/hello-2.1.1/intl » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/intl » Making all in po make[2]: entrant dans le répertoire « /root/hello-2.1.1/po » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/po » Making all in src make[2]: entrant dans le répertoire « /root/hello-2.1.1/src » source='hello.c' object='hello.o' libtool=no \ depfile='.deps/hello.Po' tmpdepfile='.deps/hello.TPo' \ depmode=gcc3 /bin/bash ../depcomp \ gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -g -O2 -c `test -f 'hello.c' || echo './'`hello.c source='version.c' object='version.o' libtool=no \ depfile='.deps/version.Po' tmpdepfile='.deps/version.TPo' \ depmode=gcc3 /bin/bash ../depcomp \ gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -g -O2 -c `test -f 'version.c' || echo './'`version.c source='getopt.c' object='getopt.o' libtool=no \ depfile='.deps/getopt.Po' tmpdepfile='.deps/getopt.TPo' \ depmode=gcc3 /bin/bash ../depcomp \ gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -g -O2 -c `test -f 'getopt.c' || echo './'`getopt.c source='getopt1.c' object='getopt1.o' libtool=no \ depfile='.deps/getopt1.Po' tmpdepfile='.deps/getopt1.TPo' \ depmode=gcc3 /bin/bash ../depcomp \ gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I. -I. -I.. -I../intl -I../intl -g -O2 -c `test -f 'getopt1.c' || echo './'`getopt1.c gcc -g -O2 -o hello hello.o version.o getopt.o getopt1.o make[2]: quittant le répertoire « /root/hello-2.1.1/src » Making all in man make[2]: entrant dans le répertoire « /root/hello-2.1.1/man » perl help2man --name="Friendly Greeting Program" ../src/hello >hello.1 make[2]: quittant le répertoire « /root/hello-2.1.1/man » Making all in m4 make[2]: entrant dans le répertoire « /root/hello-2.1.1/m4 » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/m4 » Making all in tests make[2]: entrant dans le répertoire « /root/hello-2.1.1/tests » make[2]: Rien à faire pour « all ». make[2]: quittant le répertoire « /root/hello-2.1.1/tests » make[2]: entrant dans le répertoire « /root/hello-2.1.1 » make[2]: Rien à faire pour « all-am ». make[2]: quittant le répertoire « /root/hello-2.1.1 » make[1]: quittant le répertoire « /root/hello-2.1.1 »
make check permet de vérifier si la commande make a bien fonctionné.
root@ubuntu:~/hello-2.1.1# make check Making check in contrib make[1]: entrant dans le répertoire « /root/hello-2.1.1/contrib » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/contrib » Making check in doc make[1]: entrant dans le répertoire « /root/hello-2.1.1/doc » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/doc » Making check in intl make[1]: entrant dans le répertoire « /root/hello-2.1.1/intl » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/intl » Making check in po make[1]: entrant dans le répertoire « /root/hello-2.1.1/po » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/po » Making check in src make[1]: entrant dans le répertoire « /root/hello-2.1.1/src » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/src » Making check in man make[1]: entrant dans le répertoire « /root/hello-2.1.1/man » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/man » Making check in m4 make[1]: entrant dans le répertoire « /root/hello-2.1.1/m4 » make[1]: Rien à faire pour « check ». make[1]: quittant le répertoire « /root/hello-2.1.1/m4 » Making check in tests make[1]: entrant dans le répertoire « /root/hello-2.1.1/tests » make check-TESTS make[2]: entrant dans le répertoire « /root/hello-2.1.1/tests » PASS: hello-1 PASS: world-1 PASS: nothing-1 ================== All 3 tests passed ================== make[2]: quittant le répertoire « /root/hello-2.1.1/tests » make[1]: quittant le répertoire « /root/hello-2.1.1/tests » make[1]: entrant dans le répertoire « /root/hello-2.1.1 » make[1]: Rien à faire pour « check-am ». make[1]: quittant le répertoire « /root/hello-2.1.1 »
make install sert à installer le logiciel.
root@ubuntu:~/hello-2.1.1# make install Making install in contrib make[1]: entrant dans le répertoire « /root/hello-2.1.1/contrib » make[2]: entrant dans le répertoire « /root/hello-2.1.1/contrib » make[2]: Rien à faire pour « install-exec-am ». make[2]: Rien à faire pour « install-data-am ». make[2]: quittant le répertoire « /root/hello-2.1.1/contrib » make[1]: quittant le répertoire « /root/hello-2.1.1/contrib » Making install in doc make[1]: entrant dans le répertoire « /root/hello-2.1.1/doc » make[2]: entrant dans le répertoire « /root/hello-2.1.1/doc » make[2]: Rien à faire pour « install-exec-am ». /bin/bash ../mkinstalldirs /usr/local/info mkdir -p -- /usr/local/info /usr/bin/install -c -m 644 ./hello.info /usr/local/info/hello.info install-info --info-dir=/usr/local/info /usr/local/info/hello.info This is not dpkg install-info anymore, but GNU install-info See the man page for ginstall-info for command line arguments make[2]: quittant le répertoire « /root/hello-2.1.1/doc » make[1]: quittant le répertoire « /root/hello-2.1.1/doc » Making install in intl make[1]: entrant dans le répertoire « /root/hello-2.1.1/intl » if test "hello" = "gettext" \ && test '' = 'intl-compat.o'; then \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib /usr/local/include; \ /usr/bin/install -c -m 644 libintl.h /usr/local/include/libintl.h; \ @LIBTOOL@ --mode=install \ /usr/bin/install -c -m 644 libintl.a /usr/local/lib/libintl.a; \ else \ : ; \ fi if test 'no' = yes; then \ test yes != no || /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/lib; \ temp=/usr/local/lib/t-charset.alias; \ dest=/usr/local/lib/charset.alias; \ if test -f /usr/local/lib/charset.alias; then \ orig=/usr/local/lib/charset.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ else \ if test yes = no; then \ orig=charset.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ fi; \ fi; \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share/locale; \ test -f /usr/local/share/locale/locale.alias \ && orig=/usr/local/share/locale/locale.alias \ || orig=./locale.alias; \ temp=/usr/local/share/locale/t-locale.alias; \ dest=/usr/local/share/locale/locale.alias; \ sed -f ref-add.sed $orig > $temp; \ /usr/bin/install -c -m 644 $temp $dest; \ rm -f $temp; \ else \ : ; \ fi if test "hello" = "gettext"; then \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share/gettext/intl; \ /usr/bin/install -c -m 644 VERSION /usr/local/share/gettext/intl/VERSION; \ /usr/bin/install -c -m 644 ChangeLog.inst /usr/local/share/gettext/intl/ChangeLog; \ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 Makefile.in config.charset locale.alias ref-add.sin ref-del.sin gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h libgnuintl.h loadinfo.h bindtextdom.c dcgettext.c dgettext.c gettext.c finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y plural-exp.c localcharset.c localename.c osdep.c os2compat.c intl-compat.c"; \ for file in $dists; do \ /usr/bin/install -c -m 644 ./$file \ /usr/local/share/gettext/intl/$file; \ done; \ chmod a+x /usr/local/share/gettext/intl/config.charset; \ dists="plural.c"; \ for file in $dists; do \ if test -f $file; then dir=.; else dir=.; fi; \ /usr/bin/install -c -m 644 $dir/$file \ /usr/local/share/gettext/intl/$file; \ done; \ dists="xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c COPYING.LIB-2 gettext.h libgettext.h plural-eval.c"; \ for file in $dists; do \ rm -f /usr/local/share/gettext/intl/$file; \ done; \ else \ : ; \ fi make[1]: quittant le répertoire « /root/hello-2.1.1/intl » Making install in po make[1]: entrant dans le répertoire « /root/hello-2.1.1/po » /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share mkdir -p -- /usr/local/share/locale/ca/LC_MESSAGES installing ca.gmo as /usr/local/share/locale/ca/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/da/LC_MESSAGES installing da.gmo as /usr/local/share/locale/da/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/de/LC_MESSAGES installing de.gmo as /usr/local/share/locale/de/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/de_DE/LC_MESSAGES installing de_DE.gmo as /usr/local/share/locale/de_DE/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/el/LC_MESSAGES installing el.gmo as /usr/local/share/locale/el/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/eo/LC_MESSAGES installing eo.gmo as /usr/local/share/locale/eo/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/es/LC_MESSAGES installing es.gmo as /usr/local/share/locale/es/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/et/LC_MESSAGES installing et.gmo as /usr/local/share/locale/et/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/fi/LC_MESSAGES installing fi.gmo as /usr/local/share/locale/fi/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/fr/LC_MESSAGES installing fr.gmo as /usr/local/share/locale/fr/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/gl/LC_MESSAGES installing gl.gmo as /usr/local/share/locale/gl/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/he/LC_MESSAGES installing he.gmo as /usr/local/share/locale/he/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/hr/LC_MESSAGES installing hr.gmo as /usr/local/share/locale/hr/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/hu/LC_MESSAGES installing hu.gmo as /usr/local/share/locale/hu/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/id/LC_MESSAGES installing id.gmo as /usr/local/share/locale/id/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/it/LC_MESSAGES installing it.gmo as /usr/local/share/locale/it/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/ja/LC_MESSAGES installing ja.gmo as /usr/local/share/locale/ja/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/ko/LC_MESSAGES installing ko.gmo as /usr/local/share/locale/ko/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/lv/LC_MESSAGES installing lv.gmo as /usr/local/share/locale/lv/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/nb/LC_MESSAGES installing nb.gmo as /usr/local/share/locale/nb/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/nl/LC_MESSAGES installing nl.gmo as /usr/local/share/locale/nl/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/nn/LC_MESSAGES installing nn.gmo as /usr/local/share/locale/nn/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/pl/LC_MESSAGES installing pl.gmo as /usr/local/share/locale/pl/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/pt/LC_MESSAGES installing pt.gmo as /usr/local/share/locale/pt/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/pt_BR/LC_MESSAGES installing pt_BR.gmo as /usr/local/share/locale/pt_BR/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/ru/LC_MESSAGES installing ru.gmo as /usr/local/share/locale/ru/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/sk/LC_MESSAGES installing sk.gmo as /usr/local/share/locale/sk/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/sl/LC_MESSAGES installing sl.gmo as /usr/local/share/locale/sl/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/sv/LC_MESSAGES installing sv.gmo as /usr/local/share/locale/sv/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/tr/LC_MESSAGES installing tr.gmo as /usr/local/share/locale/tr/LC_MESSAGES/hello.mo mkdir -p -- /usr/local/share/locale/uk/LC_MESSAGES installing uk.gmo as /usr/local/share/locale/uk/LC_MESSAGES/hello.mo if test "hello" = "gettext"; then \ /bin/sh `case "./mkinstalldirs" in /*) echo "./mkinstalldirs" ;; *) echo ".././mkinstalldirs" ;; esac` /usr/local/share/gettext/po; \ for file in Makefile.in.in Makevars remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot ; do \ /usr/bin/install -c -m 644 ./$file \ /usr/local/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[1]: quittant le répertoire « /root/hello-2.1.1/po » Making install in src make[1]: entrant dans le répertoire « /root/hello-2.1.1/src » make[2]: entrant dans le répertoire « /root/hello-2.1.1/src » /bin/bash ../mkinstalldirs /usr/local/bin /usr/bin/install -c hello /usr/local/bin/hello make[2]: Rien à faire pour « install-data-am ». make[2]: quittant le répertoire « /root/hello-2.1.1/src » make[1]: quittant le répertoire « /root/hello-2.1.1/src » Making install in man make[1]: entrant dans le répertoire « /root/hello-2.1.1/man » make[2]: entrant dans le répertoire « /root/hello-2.1.1/man » make[2]: Rien à faire pour « install-exec-am ». /bin/bash ../mkinstalldirs /usr/local/man/man1 mkdir -p -- /usr/local/man/man1 /usr/bin/install -c -m 644 ./hello.1 /usr/local/man/man1/hello.1 make[2]: quittant le répertoire « /root/hello-2.1.1/man » make[1]: quittant le répertoire « /root/hello-2.1.1/man » Making install in m4 make[1]: entrant dans le répertoire « /root/hello-2.1.1/m4 » make[2]: entrant dans le répertoire « /root/hello-2.1.1/m4 » make[2]: Rien à faire pour « install-exec-am ». make[2]: Rien à faire pour « install-data-am ». make[2]: quittant le répertoire « /root/hello-2.1.1/m4 » make[1]: quittant le répertoire « /root/hello-2.1.1/m4 » Making install in tests make[1]: entrant dans le répertoire « /root/hello-2.1.1/tests » make[2]: entrant dans le répertoire « /root/hello-2.1.1/tests » make[2]: Rien à faire pour « install-exec-am ». make[2]: Rien à faire pour « install-data-am ». make[2]: quittant le répertoire « /root/hello-2.1.1/tests » make[1]: quittant le répertoire « /root/hello-2.1.1/tests » make[1]: entrant dans le répertoire « /root/hello-2.1.1 » make[2]: entrant dans le répertoire « /root/hello-2.1.1 » make[2]: Rien à faire pour « install-exec-am ». make[2]: Rien à faire pour « install-data-am ». make[2]: quittant le répertoire « /root/hello-2.1.1 » make[1]: quittant le répertoire « /root/hello-2.1.1 »
Il convient maintenant de tester le nouveau logiciel :
root@ubuntu:~/hello-2.1.1# hello Bonjour, le monde!
Le logiciel hello a été correctement installé.
Placez-vous dans le répertoire personnel de root grâce à la commande cd ~.
Afin de faciliter l'installation, la désinstallation et la gestion des logiciels (appelés paquets) sous Linux, Debian et ses dérivés utilisent un format de fichier de logiciels installables spécifique. Celui-ci s'appelle DEB. La commande utilisée pour manipuler ses paquetages s'appelle dpkg.
Les options de la commande dpkg sont :
root@ubuntu:~# dpkg --help Syntaxe : dpkg [<option> ...] <commande> Commands: -i|--install <.deb file name> ... | -R|--recursive <directory> ... --unpack <.deb file name> ... | -R|--recursive <directory> ... -A|--record-avail <.deb file name> ... | -R|--recursive <directory> ... --configure <package> ... | -a|--pending --triggers-only <package> ... | -a|--pending -r|--remove <package> ... | -a|--pending -P|--purge <package> ... | -a|--pending -V|--verify <package> ... Verify the integrity of package(s). --get-selections [<pattern> ...] Get list of selections to stdout. --set-selections Set package selections from stdin. --clear-selections Deselect every non-essential package. --update-avail <Packages-file> Replace available packages info. --merge-avail <Packages-file> Merge with info from file. --clear-avail Erase existing available info. --forget-old-unavail Forget uninstalled unavailable pkgs. -s|--status <package> ... Display package status details. -p|--print-avail <package> ... Display available version details. -L|--listfiles <package> ... List files `owned' by package(s). -l|--list [<pattern> ...] List packages concisely. -S|--search <pattern> ... Find package(s) owning file(s). -C|--audit Check for broken package(s). --add-architecture <arch> Add <arch> to the list of architectures. --remove-architecture <arch> Remove <arch> from the list of architectures. --print-architecture Print dpkg architecture. --print-foreign-architectures Print allowed foreign architectures. --compare-versions <a> <op> <b> Compare version numbers - see below. --force-help Show help on forcing. -Dh|--debug=help Show help on debugging. -?, --help Afficher ce message. --version Afficher la version. Utiliser dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field| -x|--extract|-X|--vextract|--fsys-tarfile sur les archives (taper dpkg-deb --help.) À usage interne : dpkg --assert-support-predepends | --predep-package | --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep| --assert-multi-arch. Options: --admindir=<directory> Use <directory> instead of /var/lib/dpkg. --root=<directory> Install on a different root directory. --instdir=<directory> Change installation dir without changing admin dir. --path-exclude=<pattern> Do not install paths which match a shell pattern. --path-include=<pattern> Re-include a pattern after a previous exclusion. -O|--selected-only Skip packages not selected for install/upgrade. -E|--skip-same-version Skip packages whose same version is installed. -G|--refuse-downgrade Skip packages with earlier version than installed. -B|--auto-deconfigure Install even if it would break some other package. --[no-]triggers Skip or force consequential trigger processing. --verify-format=<format> Verify output format (supported: 'rpm'). --no-debsig Do not try to verify package signatures. --no-act|--dry-run|--simulate Just say what we would do - don't do it. -D|--debug=<octal> Enable debugging (see -Dhelp or --debug=help). --status-fd <n> Send status change updates to file descriptor <n>. --status-logger=<command> Send status change updates to <command>'s stdin. --log=<filename> Log status changes and actions to <filename>. --ignore-depends=<package>,... Ignore dependencies involving <package>. --force-... Override problems (see --force-help). --no-force-...|--refuse-... Stop when problems encountered. --abort-after <n> Abort after encountering <n> errors. Les opérateurs de comparaison pour --compare-versions sont les suivants : lt le eq ne ge gt (ne considérer aucune version comme plus tardive que n'importe quelle version) lt-nl le-nl ge-nl gt-nl (ne considérer aucune version comme plus récente que n'importe quelle version) < << <= = >= >> > (uniquement pour des raison de compatibilité avec la syntaxe du fichier control) Utilisez 'apt' ou 'aptitude' pour une gestion simplifiée des paquets.
Le fichier de configuration principal de la commande dpkg est /etc/dpkg/dpkg.cfg :
root@ubuntu:~# cat /etc/dpkg/dpkg.cfg # dpkg configuration file # # This file can contain default options for dpkg. All command-line # options are allowed. Values can be specified by putting them after # the option, separated by whitespace and/or an `=' sign. # # Do not enable debsig-verify by default; since the distribution is not using # embedded signatures, debsig-verify would reject all packages. no-debsig # Log status changes and actions to a file. log /var/log/dpkg.log
Les directives dans ce fichier sont les option de la commande dpkg sans les charactères –.
Il est important à noter que la base de données de la commande dpkg se trouve dans le répertoire /var/lib/dpkg :
root@ubuntu:~# ls -l /var/lib/dpkg total 7244 drwxr-xr-x 2 root root 4096 sept. 29 14:30 alternatives -rw-r--r-- 1 root root 1753629 sept. 27 19:16 available -rw-r--r-- 1 root root 1635060 sept. 27 19:13 available-old -rw-r--r-- 1 root root 8 juil. 22 23:57 cmethopt -rw-r--r-- 1 root root 1265 sept. 27 19:01 diversions -rw-r--r-- 1 root root 1300 sept. 27 19:01 diversions-old drwxr-xr-x 2 root root 364544 sept. 27 19:14 info -rw-r----- 1 root root 0 sept. 27 19:16 lock drwxr-xr-x 2 root root 4096 mars 7 2014 parts -rw-r--r-- 1 root root 163 juil. 23 00:17 statoverride -rw-r--r-- 1 root root 1809549 sept. 27 19:16 status -rw-r--r-- 1 root root 1809574 sept. 27 19:16 status-old drwxr-xr-x 2 root root 4096 sept. 27 19:16 triggers drwxr-xr-x 2 root root 4096 sept. 27 19:16 updates
Il est recommendé d'inclure ce répertoire et son contenu dans les sauvegardes régulières.
Afin de connaître la liste des paquets disponibles sur la machine, il convient de saisir la commande suivante dans une fenêtre de console en tant que root :
root@ubuntu:~# dpkg -l | more Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder | État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements |/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais) ||/ Nom Version Architecture Description +++-=====================================================-===================================================-============-===================== ========================================================== ii account-plugin-aim 3.8.6-0ubuntu9.1 i386 Messaging account plu gin for AIM ii account-plugin-facebook 0.11+14.04.20140409.1-0ubuntu1 all GNOME Control Center account plugin for single signon - facebook ii account-plugin-flickr 0.11+14.04.20140409.1-0ubuntu1 all GNOME Control Center account plugin for single signon - flickr ii account-plugin-google 0.11+14.04.20140409.1-0ubuntu1 all GNOME Control Center account plugin for single signon ii account-plugin-jabber 3.8.6-0ubuntu9.1 i386 Messaging account plu gin for Jabber/XMPP ii account-plugin-salut 3.8.6-0ubuntu9.1 i386 Messaging account plu gin for Local XMPP (Salut) ii account-plugin-twitter 0.11+14.04.20140409.1-0ubuntu1 all GNOME Control Center account plugin for single signon - twitter ii account-plugin-windows-live 0.11+14.04.20140409.1-0ubuntu1 all GNOME Control Center account plugin for single signon - windows live ii account-plugin-yahoo 3.8.6-0ubuntu9.1 i386 Messaging account plu gin for Yahoo! ii accountsservice 0.6.35-0ubuntu7 i386 query and manipulate user account information ii acl 2.2.52-1 i386 Access control list u tilities ii acpi-support 0.142 i386 scripts for handling many ACPI events ii acpid 1:2.0.21-1ubuntu2 i386 Advanced Configuratio n and Power Interface event daemon ii activity-log-manager 0.9.7-0ubuntu14 i386 blacklist configurati on user interface for Zeitgeist --Plus--
L'option -l liste les paquets disponibles spécifiés par le fichier /var/lib/dpkg/available.
root@ubuntu:~# more /var/lib/dpkg/available Package: xserver-xorg-input-vmmouse Priority: optional Section: x11 Installed-Size: 112 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 Version: 1:13.0.0-1build1 Provides: xorg-driver-input Depends: libc6 (>= 2.7), xorg-input-abi-20, xserver-xorg-core (>= 2:1.14.99.902), xserver-xorg-input-mouse, udev Size: 13460 Description: X.Org X server -- VMMouse input driver to use with VMWare This package provides the driver for the X11 vmmouse input device. . The VMMouse driver enables support for the special VMMouse protocol that is provided by VMware virtual machines to give absolute pointer positioning. . The vmmouse driver is capable of falling back to the standard "mouse" driver if a VMware virtual machine is not detected. This allows for dual-booting of an operating system from a virtual machine to real hardware without having to edit xorg.conf every time. . More information about X.Org can be found at: <URL:http://www.X.org> . This package is built from the X.org xf86-input-vmmouse driver module. Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Package: kpartx Priority: extra Section: admin Installed-Size: 110 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 --Plus--(0%)
Le statut de chaque paquet est inclus dans le fichier /var/lib/dpkg/status :
root@ubuntu:~# more /var/lib/dpkg/status Package: xserver-xorg-input-vmmouse Status: install ok installed Priority: optional Section: x11 Installed-Size: 112 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 Version: 1:13.0.0-1build1 Provides: xorg-driver-input Depends: libc6 (>= 2.7), xorg-input-abi-20, xserver-xorg-core (>= 2:1.14.99.902), xserver-xorg-input-mouse, udev Description: X.Org X server -- VMMouse input driver to use with VMWare This package provides the driver for the X11 vmmouse input device. . The VMMouse driver enables support for the special VMMouse protocol that is provided by VMware virtual machines to give absolute pointer positioning. . The vmmouse driver is capable of falling back to the standard "mouse" driver if a VMware virtual machine is not detected. This allows for dual-booting of an operating system from a virtual machine to real hardware without having to edit xorg.conf every time. . More information about X.Org can be found at: <URL:http://www.X.org> . This package is built from the X.org xf86-input-vmmouse driver module. Original-Maintainer: Debian X Strike Force <debian-x@lists.debian.org> Package: libexempi3 Status: install ok installed Priority: optional Section: libs Installed-Size: 1121 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> --Plus--(0%)
Afin de connaître le nombre total de paquets disponibles, utilisez la commande suivante :
root@ubuntu:~# dpkg -l | wc -l 1808
Afin de connaître le nombre total de paquets installés, utilisez la commande suivante :
root@ubuntu:~# dpkg --get-selections | wc -l 1803
Imaginons maintenant que vous souhaitez vérifier si un paquet contenant la chaîne de caractères zip soit déjà installé sur la machine. Dans ce cas, il convient d'abord d'utiliser la commande suivante :
root@ubuntu:~# dpkg --get-selections | grep zip bzip2 install gzip install libarchive-zip-perl install libperlio-gzip-perl install unzip install zip install
Afin de connaître le statut de du paquet gzip, il convient de saisir la commande suivante :
root@ubuntu:~# dpkg -s gzip Package: gzip Essential: yes Status: install ok installed Priority: required Section: utils Installed-Size: 231 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Architecture: i386 Version: 1.6-3ubuntu1 Depends: dpkg (>= 1.15.4) | install-info Pre-Depends: libc6 (>= 2.17) Suggests: less Description: GNU compression utilities This package provides the standard GNU file compression utilities, which are also the default compression tools for Debian. They typically operate on files with names ending in '.gz', but can also decompress files ending in '.Z' created with 'compress'. Original-Maintainer: Bdale Garbee <bdale@gag.com>
Afin de lister tous les fichiers installés par le paquet gzip, utilisez la commande suivante :
root@ubuntu:~# dpkg -L gzip /. /bin /bin/znew /bin/zcat /bin/gzexe /bin/gunzip /bin/zdiff /bin/zless /bin/zfgrep /bin/uncompress /bin/zforce /bin/zgrep /bin/gzip /bin/zegrep /bin/zcmp /bin/zmore /usr /usr/share /usr/share/lintian /usr/share/lintian/overrides /usr/share/man /usr/share/man/man1 /usr/share/man/man1/zless.1.gz /usr/share/man/man1/zdiff.1.gz /usr/share/man/man1/zgrep.1.gz /usr/share/man/man1/zmore.1.gz /usr/share/man/man1/gzexe.1.gz /usr/share/man/man1/gzip.1.gz /usr/share/man/man1/zforce.1.gz /usr/share/man/man1/znew.1.gz /usr/share/doc /usr/share/doc/gzip /usr/share/doc/gzip/changelog.Debian.gz /usr/share/doc/gzip/copyright /usr/share/doc/gzip/README.gz /usr/share/doc/gzip/TODO /usr/share/doc/gzip/README-release /usr/share/info /usr/share/info/gzip.info.gz /usr/share/man/man1/zcat.1.gz /usr/share/man/man1/zfgrep.1.gz /usr/share/man/man1/zegrep.1.gz /usr/share/man/man1/gunzip.1.gz /usr/share/man/man1/zcmp.1.gz /usr/share/man/man1/uncompress.1.gz
A l'inverse, si vous connaissez le nom d'un fichier et vous souhaitez savoir quel paquet l'a installé, utilisez la commande suivante :
root@ubuntu:~# dpkg -S /bin/zfgrep gzip: /bin/zfgrep
La commande dselect est un outil interactif utilisé pour gérer, installer et désinstaller des paquets. C'est un Front End à la commande dpkg et est lancé sans options.
La commande dselect n'est pas installé par défaut. Il convient donc d'utiliser la commande apt-get pour l'installer :
root@ubuntu:~# apt-get install dselect Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les NOUVEAUX paquets suivants seront installés : dselect 0 mis à jour, 1 nouvellement installés, 0 à enlever et 161 non mis à jour. Il est nécessaire de prendre 177 ko dans les archives. Après cette opération, 1 442 ko d'espace disque supplémentaires seront utilisés. Réception de : 1 http://fr.archive.ubuntu.com/ubuntu/ trusty-updates/main dselect i386 1.17.5ubuntu5.3 [177 kB] 177 ko réceptionnés en 0s (178 ko/s) Sélection du paquet dselect précédemment désélectionné. (Lecture de la base de données... 167641 fichiers et répertoires déjà installés.) Préparation du décompactage de .../dselect_1.17.5ubuntu5.3_i386.deb ... Décompactage de dselect (1.17.5ubuntu5.3) ... Traitement déclenché pour man-db (2.6.7.1-1) ... Paramétrage de dselect (1.17.5ubuntu5.3) ...
Lancez maintenant dselect :
Interface de gestion de paquets Debian « dselect » version 1.17.5 (i386). * 0. [A]ccéder Choisir la méthode d'accès à utiliser 1. [M]ise à j Mise à jour de l'information sur les paquets disponibles, si possible. 2. [S]électio Sélection des paquets que vous désirez avoir sur votre système. 3. [I]nstaller Installation et mise à niveau des paquets désirés. 4. [C]onfigure Configuration de tout paquet non configuré. 5. [R]etirer Suppression des applications non désirées. 6. [Q]uitter Quitter dselect. Utilisez ^P et ^N, les touches fléchées, les lettres initiales ou les chiffres pour vous déplacer ; Appuyez sur <Entrée> pour confirmer la sélection. ^L pour redessiner l'écran. Copyright (C) 1994-1996 Ian Jackson. Copyright (C) 2000,2001 Wichert Akkerman. Ce programme est un logiciel libre ; prière de consulter la « GNU General Public License » version 2 ou supérieure pour prendre connaissance des conditions de reproduction. AUCUNE garantie n'est offerte.
Notez les instructions en bas de l'écran et expérimentez avec l'interface.
APT ou en anglais Advanced Package Tool est un gestionnaire de paquets de haut niveau capable de résoudre automatiquement les problèmes de dépendances entre les paquets.
La commande apt-get prend la forme suivante :
# apt-get <options> <commande> <paquet(s)> [Entrée]
Les options et commandes de la commande apt-get sont :
root@ubuntu:~# apt-get --help apt 1.0.1ubuntu2 pour i386 compilé sur Jun 13 2014 17:41:42 Usage : apt-get [options] commandes apt-get [options] install|remove pkg1 [pkg2 ...] apt-get [options] source pkg1 [pkg2 ...] apt-get est une interface simple en ligne de commande servant à télécharger et à installer les paquets. Les commandes les plus fréquemment employées sont update et install. Commandes : update - Récupère les nouvelles listes de paquets upgrade - Réalise une mise à jour install - Installe de nouveaux paquets (pkg1 est libc6 et non libc6.deb) remove - Supprime des paquets autoremove - Supprime tous les paquets installés automatiquement purge - Supprime des paquets et leurs fichiers de configuration source - Télécharge les archives de sources build-dep - Configure build-dependencies pour les paquets sources dist-upgrade - Met à jour la distribution, reportez-vous à apt-get(8) dselect-upgrade - Suit les sélections de dselect clean - Supprime dans le cache local tous les fichiers téléchargés autoclean - Supprime dans le cache local les fichiers inutiles check - Vérifie qu'il n'y a pas de rupture de dépendances changelog - Télécharge et affiche le journal des modifications (« changelog ») du paquet indiqué download - Télécharge le paquet binaire dans le répertoire courant Options : -h Ce texte d'aide -q Message de sortie enregistrable - aucun indicateur de progression -qq Aucun message de sortie, exceptés les messages d'erreur -d Simple téléchargement - n'installe pas ou ne décompacte pas les archives -s N'agit pas. Réalise uniquement une simulation de commande -y Répond oui à toutes les questions et n'interroge pas l'utilisateur -f Tente de poursuivre si le contrôle d'intégrité échoue -m Tente de poursuivre si les archives ne sont pas localisables -u Affiche une liste des paquets mis à jour -b Construit la source du paquet après l'avoir récupérée -V Affiche les numéros des versions de façon détaillée -c=? Lit ce fichier de configuration -o=? Place une option de configuration arbitraire, ex. -o dir::cache=/tmp Reportez-vous aux pages de manuels d'apt-get(8), sources.list(5) et apt.conf(5) pour plus d'informations et d'options. Cet APT a les « Super Cow Powers »
APT peut être configuré par un fichier centralisé /etc/apt/apt.conf. Un exemple est fourni :
root@ubuntu:~# cat /usr/share/doc/apt/examples/apt.conf // $Id: apt.conf,v 1.43 1999/12/06 02:19:38 jgg Exp $ /* This file is a sample configuration file with a few harmless sample options. */ APT { // Options for apt-get Get { Download-Only "false"; }; }; // Options for the downloading routines Acquire { Retries "0"; }; // Things that effect the APT dselect method DSelect { Clean "auto"; // always|auto|prompt|never }; DPkg { // Probably don't want to use force-downgrade.. Options {"--force-overwrite";} }
Le fichier /etc/apt/apt.conf n'existe pas sous Ubuntu. La configuration de la commande est donc obtenue à l'aide des options passées à la commande elle-même.
Un dépôt est un lieu de stockage de paquets binaires prêts à installer. Un dépôt peut être le DVD d'installation de la distribution, un dossier sur disque dur ou bien des serveurs distants accessibles par Internet.
Les dépôts de paquets sont spécifiés soit dans le fichier /etc/apt/sources.list, soit dans un fichier par dépôt stocké dans le répertoire /etc/apt/sources.list.d :
root@ubuntu:~# cat /etc/apt/apt.conf cat: /etc/apt/apt.conf: Aucun fichier ou dossier de ce type root@ubuntu:~# clear root@ubuntu:~# cat /etc/apt/sources.list #deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release i386 (20140722.2)]/ trusty main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://fr.archive.ubuntu.com/ubuntu/ trusty main restricted deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://fr.archive.ubuntu.com/ubuntu/ trusty-updates main restricted deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://fr.archive.ubuntu.com/ubuntu/ trusty universe deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty universe deb http://fr.archive.ubuntu.com/ubuntu/ trusty-updates universe deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb http://fr.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://fr.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://fr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu trusty-security main restricted deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted deb http://security.ubuntu.com/ubuntu trusty-security universe deb-src http://security.ubuntu.com/ubuntu trusty-security universe deb http://security.ubuntu.com/ubuntu trusty-security multiverse deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb http://archive.canonical.com/ubuntu trusty partner # deb-src http://archive.canonical.com/ubuntu trusty partner ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb http://extras.ubuntu.com/ubuntu trusty main deb-src http://extras.ubuntu.com/ubuntu trusty main
Ces lignes de ce fichier comportent quatre champs :
Il est possible d'ajouter une source directement en éditant le fichier /etc/apt/sources.list, en créant un fichier spécifique dans le répertoire /etc/apt/sources.list.d ou en utilisant la commande apt-setup.
La mise à jour de la base de références de la description des paquets est effectuée un utilisant la commande suivante :
root@ubuntu:~# apt-get update Ign http://security.ubuntu.com trusty-security InRelease Ign http://extras.ubuntu.com trusty InRelease Réception de : 1 http://security.ubuntu.com trusty-security Release.gpg [933 B] Ign http://fr.archive.ubuntu.com trusty InRelease Atteint http://extras.ubuntu.com trusty Release.gpg Réception de : 2 http://security.ubuntu.com trusty-security Release [59,7 kB] Ign http://fr.archive.ubuntu.com trusty-updates InRelease Atteint http://extras.ubuntu.com trusty Release Ign http://fr.archive.ubuntu.com trusty-backports InRelease Atteint http://extras.ubuntu.com trusty/main Sources Atteint http://extras.ubuntu.com trusty/main i386 Packages Atteint http://fr.archive.ubuntu.com trusty Release.gpg Réception de : 3 http://security.ubuntu.com trusty-security/main Sources [46,3 kB] Réception de : 4 http://fr.archive.ubuntu.com trusty-updates Release.gpg [933 B] Réception de : 5 http://fr.archive.ubuntu.com trusty-backports Release.gpg [933 B] Réception de : 6 http://security.ubuntu.com trusty-security/restricted Sources [14 B] Atteint http://fr.archive.ubuntu.com trusty Release Réception de : 7 http://security.ubuntu.com trusty-security/universe Sources [10,8 kB] Réception de : 8 http://fr.archive.ubuntu.com trusty-updates Release [59,7 kB] Réception de : 9 http://security.ubuntu.com trusty-security/multiverse Sources [700 B] Réception de : 10 http://security.ubuntu.com trusty-security/main i386 Packages [139 kB] Réception de : 11 http://fr.archive.ubuntu.com trusty-backports Release [59,7 kB] Réception de : 12 http://security.ubuntu.com trusty-security/restricted i386 Packages [14 B] Atteint http://fr.archive.ubuntu.com trusty/main Sources Réception de : 13 http://security.ubuntu.com trusty-security/universe i386 Packages [49,0 kB] Atteint http://fr.archive.ubuntu.com trusty/restricted Sources Réception de : 14 http://security.ubuntu.com trusty-security/multiverse i386 Packages [1 398 B] Ign http://extras.ubuntu.com trusty/main Translation-fr_FR Atteint http://fr.archive.ubuntu.com trusty/universe Sources Atteint http://security.ubuntu.com trusty-security/main Translation-en Ign http://extras.ubuntu.com trusty/main Translation-fr Atteint http://security.ubuntu.com trusty-security/multiverse Translation-en Atteint http://fr.archive.ubuntu.com trusty/multiverse Sources Ign http://extras.ubuntu.com trusty/main Translation-en Atteint http://security.ubuntu.com trusty-security/restricted Translation-en Atteint http://fr.archive.ubuntu.com trusty/main i386 Packages Atteint http://security.ubuntu.com trusty-security/universe Translation-en Atteint http://fr.archive.ubuntu.com trusty/restricted i386 Packages Atteint http://fr.archive.ubuntu.com trusty/universe i386 Packages Atteint http://fr.archive.ubuntu.com trusty/multiverse i386 Packages Atteint http://fr.archive.ubuntu.com trusty/main Translation-fr Atteint http://fr.archive.ubuntu.com trusty/main Translation-en Atteint http://fr.archive.ubuntu.com trusty/multiverse Translation-fr Atteint http://fr.archive.ubuntu.com trusty/multiverse Translation-en Atteint http://fr.archive.ubuntu.com trusty/restricted Translation-fr Atteint http://fr.archive.ubuntu.com trusty/restricted Translation-en Atteint http://fr.archive.ubuntu.com trusty/universe Translation-fr Atteint http://fr.archive.ubuntu.com trusty/universe Translation-en Réception de : 15 http://fr.archive.ubuntu.com trusty-updates/main Sources [125 kB] Réception de : 16 http://fr.archive.ubuntu.com trusty-updates/restricted Sources [1 408 B] Réception de : 17 http://fr.archive.ubuntu.com trusty-updates/universe Sources [86,2 kB] Réception de : 18 http://fr.archive.ubuntu.com trusty-updates/multiverse Sources [3 531 B] Réception de : 19 http://fr.archive.ubuntu.com trusty-updates/main i386 Packages [331 kB] Réception de : 20 http://fr.archive.ubuntu.com trusty-updates/restricted i386 Packages [5 820 B] Réception de : 21 http://fr.archive.ubuntu.com trusty-updates/universe i386 Packages [209 kB] Réception de : 22 http://fr.archive.ubuntu.com trusty-updates/multiverse i386 Packages [9 532 B] Atteint http://fr.archive.ubuntu.com trusty-updates/main Translation-en Atteint http://fr.archive.ubuntu.com trusty-updates/multiverse Translation-en Atteint http://fr.archive.ubuntu.com trusty-updates/restricted Translation-en Atteint http://fr.archive.ubuntu.com trusty-updates/universe Translation-en Réception de : 23 http://fr.archive.ubuntu.com trusty-backports/main Sources [4 760 B] Réception de : 24 http://fr.archive.ubuntu.com trusty-backports/restricted Sources [14 B] Réception de : 25 http://fr.archive.ubuntu.com trusty-backports/universe Sources [14,1 kB] Réception de : 26 http://fr.archive.ubuntu.com trusty-backports/multiverse Sources [1 315 B] Réception de : 27 http://fr.archive.ubuntu.com trusty-backports/main i386 Packages [6 379 B] Réception de : 28 http://fr.archive.ubuntu.com trusty-backports/restricted i386 Packages [14 B] Réception de : 29 http://fr.archive.ubuntu.com trusty-backports/universe i386 Packages [17,4 kB] Réception de : 30 http://fr.archive.ubuntu.com trusty-backports/multiverse i386 Packages [945 B] Atteint http://fr.archive.ubuntu.com trusty-backports/main Translation-en Atteint http://fr.archive.ubuntu.com trusty-backports/multiverse Translation-en Atteint http://fr.archive.ubuntu.com trusty-backports/restricted Translation-en Atteint http://fr.archive.ubuntu.com trusty-backports/universe Translation-en Ign http://fr.archive.ubuntu.com trusty/main Translation-fr_FR Ign http://fr.archive.ubuntu.com trusty/multiverse Translation-fr_FR Ign http://fr.archive.ubuntu.com trusty/restricted Translation-fr_FR Ign http://fr.archive.ubuntu.com trusty/universe Translation-fr_FR 1 246 ko réceptionnés en 5s (217 ko/s) Lecture des listes de paquets... Fait
Les commandes les plus utilisées d'apt-get sont :
Commande | Description |
---|---|
install | Installer un ou plusieurs paquets. |
upgrade | Mettre à jour les paquets installés. |
remove | Supprimer un paquet. |
purge | Supprimer un paquet et ses fichiers de configuration. |
Commencez par installer le paquet mc :
root@ubuntu:~# apt-get install mc Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les paquets supplémentaires suivants seront installés : libssh2-1 mc-data Paquets suggérés : arj catdvi texlive-binaries dbview djvulibre-bin gv imagemagick links w3m lynx odt2txt python-boto python-tz Les NOUVEAUX paquets suivants seront installés : libssh2-1 mc mc-data 0 mis à jour, 3 nouvellement installés, 0 à enlever et 161 non mis à jour. Il est nécessaire de prendre 1 653 ko dans les archives. Après cette opération, 7 195 ko d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n] o Réception de : 1 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe libssh2-1 i386 1.4.3-2 [65,1 kB] Réception de : 2 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe mc-data all 3:4.8.11-1 [1 134 kB] Réception de : 3 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe mc i386 3:4.8.11-1 [454 kB] 1 653 ko réceptionnés en 1s (1 355 ko/s) Sélection du paquet libssh2-1:i386 précédemment désélectionné. (Lecture de la base de données... 167708 fichiers et répertoires déjà installés.) Préparation du décompactage de .../libssh2-1_1.4.3-2_i386.deb ... Décompactage de libssh2-1:i386 (1.4.3-2) ... Sélection du paquet mc-data précédemment désélectionné. Préparation du décompactage de .../mc-data_3%3a4.8.11-1_all.deb ... Décompactage de mc-data (3:4.8.11-1) ... Sélection du paquet mc précédemment désélectionné. Préparation du décompactage de .../mc_3%3a4.8.11-1_i386.deb ... Décompactage de mc (3:4.8.11-1) ... Traitement déclenché pour man-db (2.6.7.1-1) ... Traitement déclenché pour hicolor-icon-theme (0.13-1) ... Traitement déclenché pour doc-base (0.10.5) ... Traitement en cours 1 added doc-base file... Traitement déclenché pour gnome-menus (3.10.1-0ubuntu2) ... Traitement déclenché pour desktop-file-utils (0.22-1ubuntu1) ... Traitement déclenché pour bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Traitement déclenché pour mime-support (3.54ubuntu1) ... Paramétrage de libssh2-1:i386 (1.4.3-2) ... Paramétrage de mc-data (3:4.8.11-1) ... Paramétrage de mc (3:4.8.11-1) ... update-alternatives: utilisation de « /usr/bin/mcview » pour fournir « /usr/bin/view » (view) en mode automatique Traitement déclenché pour libc-bin (2.19-0ubuntu6) ...
La ré-installation d'un paquet est effectuée un utilisant la commande suivante :
root@ubuntu:~# apt-get --reinstall install mc Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait 0 mis à jour, 0 nouvellement installés, 1 réinstallés, 0 à enlever et 161 non mis à jour. Il est nécessaire de prendre 0 o/454 ko dans les archives. Après cette opération, 0 o d'espace disque supplémentaires seront utilisés. (Lecture de la base de données... 168063 fichiers et répertoires déjà installés.) Préparation du décompactage de .../mc_3%3a4.8.11-1_i386.deb ... Décompactage de mc (3:4.8.11-1) sur (3:4.8.11-1) ... Traitement déclenché pour gnome-menus (3.10.1-0ubuntu2) ... Traitement déclenché pour desktop-file-utils (0.22-1ubuntu1) ... Traitement déclenché pour bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Traitement déclenché pour mime-support (3.54ubuntu1) ... Paramétrage de mc (3:4.8.11-1) ...
La suppression complète d'un paquetage, y compris les fichiers de configuration éventuellement modifiés est effectuée un utilisant la commande suivante :
root@ubuntu:~# apt-get --purge remove mc Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires : libssh2-1 mc-data Veuillez utiliser « apt-get autoremove » pour les supprimer. Les paquets suivants seront ENLEVÉS : mc* 0 mis à jour, 0 nouvellement installés, 1 à enlever et 161 non mis à jour. Après cette opération, 1 454 ko d'espace disque seront libérés. Souhaitez-vous continuer ? [O/n] o (Lecture de la base de données... 168062 fichiers et répertoires déjà installés.) Suppression de mc (3:4.8.11-1) ... update-alternatives: utilisation de « /usr/bin/vim.tiny » pour fournir « /usr/bin/view » (view) en mode automatique Purging configuration files for mc (3:4.8.11-1) ... Traitement déclenché pour gnome-menus (3.10.1-0ubuntu2) ... Traitement déclenché pour desktop-file-utils (0.22-1ubuntu1) ... Traitement déclenché pour bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Traitement déclenché pour mime-support (3.54ubuntu1) ...
Les paquets téléchargés d'une source distante ou via une source copy:// sont stockés dans le répertoire /var/cache/apt/archives. Les paquets partiellement téléchargés ou copiés sont stockés dans le répertoire /var/cache/apt/archives/partial.
root@ubuntu:~# ls /var/cache/apt/archives/ accountsservice_0.6.35-0ubuntu7.1_i386.deb apport_2.14.1-0ubuntu3.4_all.deb apport-gtk_2.14.1-0ubuntu3.4_all.deb apt_1.0.1ubuntu2.4.1_i386.deb apt-clone_0.3.1~ubuntu11.1_all.deb aptdaemon_1.1.1-1ubuntu5.1_all.deb aptdaemon-data_1.1.1-1ubuntu5.1_all.deb bash_4.3-7ubuntu1.4_i386.deb chromium-codecs-ffmpeg-extra_37.0.2062.120-0ubuntu0.14.04.1~pkg1049_i386.deb cups_1.7.2-0ubuntu1.2_i386.deb cups-bsd_1.7.2-0ubuntu1.2_i386.deb cups-client_1.7.2-0ubuntu1.2_i386.deb cups-common_1.7.2-0ubuntu1.2_all.deb cups-core-drivers_1.7.2-0ubuntu1.2_i386.deb cups-daemon_1.7.2-0ubuntu1.2_i386.deb cups-ppdc_1.7.2-0ubuntu1.2_i386.deb cups-server-common_1.7.2-0ubuntu1.2_all.deb dbus_1.6.18-0ubuntu4.2_i386.deb dselect_1.17.5ubuntu5.3_i386.deb evolution-data-server_3.10.4-0ubuntu1.2_i386.deb evolution-data-server-common_3.10.4-0ubuntu1.2_all.deb evolution-data-server-online-accounts_3.10.4-0ubuntu1.2_i386.deb firefox-locale-en_32.0.3+build1-0ubuntu0.14.04.1_i386.deb firefox-locale-fr_32.0.3+build1-0ubuntu0.14.04.1_i386.deb flashplugin-installer_11.2.202.406ubuntu0.14.04.1_i386.deb fonts-opensymbol_2%3a102.6+LibO4.2.6.3-0ubuntu1_all.deb freepats_20060219-1_all.deb gcc-4.9-base_4.9.1-0ubuntu1_i386.deb gir1.2-ebook-1.2_3.10.4-0ubuntu1.2_i386.deb gir1.2-ebookcontacts-1.2_3.10.4-0ubuntu1.2_i386.deb gir1.2-edataserver-1.2_3.10.4-0ubuntu1.2_i386.deb gir1.2-freedesktop_1.40.0-1ubuntu0.2_i386.deb gir1.2-glib-2.0_1.40.0-1ubuntu0.2_i386.deb gir1.2-gtk-3.0_3.10.8-0ubuntu1.2_i386.deb gir1.2-gudev-1.0_1%3a204-5ubuntu20.6_i386.deb gir1.2-javascriptcoregtk-3.0_2.4.4-1~ubuntu1_i386.deb gir1.2-webkit-3.0_2.4.4-1~ubuntu1_i386.deb gstreamer0.10-fluendo-mp3_0.10.23.debian-3_i386.deb gstreamer0.10-plugins-bad_0.10.23-7.2ubuntu1_i386.deb gstreamer0.10-plugins-ugly_0.10.19-2ubuntu5_i386.deb gstreamer1.0-fluendo-mp3_0.10.23.debian-3_i386.deb gstreamer1.0-libav_1.2.4-1~ubuntu1_i386.deb gstreamer1.0-plugins-bad_1.2.4-1~ubuntu1_i386.deb gstreamer1.0-plugins-bad-faad_1.2.4-1~ubuntu1_i386.deb gstreamer1.0-plugins-bad-videoparsers_1.2.4-1~ubuntu1_i386.deb gstreamer1.0-plugins-ugly_1.2.3-2build1_i386.deb hunspell-fr_1%3a5.0.2-1_all.deb hunspell-fr-classical_1%3a5.0.2-1_all.deb hyphen-en-us_2.8.6-3ubuntu2_all.deb hyphen-fr_1%3a4.2.1-0ubuntu1_all.deb irqbalance_1.0.6-2ubuntu0.14.04.1_i386.deb language-pack-fr_1%3a14.04+20140707_all.deb language-pack-fr-base_1%3a14.04+20140707_all.deb language-pack-gnome-fr_1%3a14.04+20140707_all.deb language-pack-gnome-fr-base_1%3a14.04+20140707_all.deb liba52-0.7.4_0.7.4-17_i386.deb libaccountsservice0_0.6.35-0ubuntu7.1_i386.deb libapt-inst1.5_1.0.1ubuntu2.4.1_i386.deb libapt-pkg4.12_1.0.1ubuntu2.4.1_i386.deb libass4_0.10.1-3ubuntu1_i386.deb libavcodec54_6%3a9.16-0ubuntu0.14.04.1_i386.deb libavformat54_6%3a9.16-0ubuntu0.14.04.1_i386.deb libavutil52_6%3a9.16-0ubuntu0.14.04.1_i386.deb libc6_2.19-0ubuntu6.3_i386.deb libc6-dbg_2.19-0ubuntu6.3_i386.deb libc6-dev_2.19-0ubuntu6.3_i386.deb libcamel-1.2-45_3.10.4-0ubuntu1.2_i386.deb libc-bin_2.19-0ubuntu6.3_i386.deb libcdaudio1_0.99.12p2-13_i386.deb libc-dev-bin_2.19-0ubuntu6.3_i386.deb libchromaprint0_1.1-1_i386.deb libcups2_1.7.2-0ubuntu1.2_i386.deb libcupscgi1_1.7.2-0ubuntu1.2_i386.deb libcupsimage2_1.7.2-0ubuntu1.2_i386.deb libcupsmime1_1.7.2-0ubuntu1.2_i386.deb libcupsppdc1_1.7.2-0ubuntu1.2_i386.deb libcurl3_7.35.0-1ubuntu2.1_i386.deb libcurl3-gnutls_7.35.0-1ubuntu2.1_i386.deb libdbus-1-3_1.6.18-0ubuntu4.2_i386.deb libdc1394-22_2.2.1-2ubuntu2_i386.deb libdca0_0.0.5-6ubuntu1_i386.deb libdirac-encoder0_1.0.2-6ubuntu1_i386.deb libdirectfb-1.2-9_1.2.10.0-5_i386.deb libdvdnav4_4.2.1-3_i386.deb libdvdread4_4.2.1-2ubuntu1_i386.deb libebackend-1.2-7_3.10.4-0ubuntu1.2_i386.deb libebook-1.2-14_3.10.4-0ubuntu1.2_i386.deb libebook-contacts-1.2-0_3.10.4-0ubuntu1.2_i386.deb libecal-1.2-16_3.10.4-0ubuntu1.2_i386.deb libedata-book-1.2-20_3.10.4-0ubuntu1.2_i386.deb libedata-cal-1.2-23_3.10.4-0ubuntu1.2_i386.deb libedataserver-1.2-18_3.10.4-0ubuntu1.2_i386.deb libenca0_1.15-2_i386.deb libfaad2_2.7-8_i386.deb libfftw3-double3_3.3.3-7ubuntu3_i386.deb libflite1_1.4-release-8_i386.deb libfluidsynth1_1.1.6-2_i386.deb libgail-3-0_3.10.8-0ubuntu1.2_i386.deb libgcc1_1%3a4.9.1-0ubuntu1_i386.deb libgcrypt11_1.5.3-2ubuntu4.1_i386.deb libgirepository-1.0-1_1.40.0-1ubuntu0.2_i386.deb libgme0_0.5.5-2_i386.deb libgpgme11_1.4.3-0.1ubuntu5.1_i386.deb libgsm1_1.0.13-4_i386.deb libgssapi-krb5-2_1.12+dfsg-2ubuntu4.2_i386.deb libgstreamer-plugins-bad0.10-0_0.10.23-7.2ubuntu1_i386.deb libgstreamer-plugins-bad1.0-0_1.2.4-1~ubuntu1_i386.deb libgtk-3-0_3.10.8-0ubuntu1.2_i386.deb libgtk-3-bin_3.10.8-0ubuntu1.2_i386.deb libgtk-3-common_3.10.8-0ubuntu1.2_all.deb libgtkglext1_1.2.0-3.1fakesync3_i386.deb libgudev-1.0-0_1%3a204-5ubuntu20.6_i386.deb libharfbuzz0b_0.9.27-1ubuntu1_i386.deb libharfbuzz-icu0_0.9.27-1ubuntu1_i386.deb libilmbase6_1.0.1-6ubuntu1_i386.deb libjavascriptcoregtk-3.0-0_2.4.4-1~ubuntu1_i386.deb libk5crypto3_1.12+dfsg-2ubuntu4.2_i386.deb libkate1_0.4.1-1ubuntu1_i386.deb libkrb5-3_1.12+dfsg-2ubuntu4.2_i386.deb libkrb5support0_1.12+dfsg-2ubuntu4.2_i386.deb liblzo2-2_2.06-1.2ubuntu1.1_i386.deb libmad0_0.15.1b-8ubuntu1_i386.deb libmimic0_1.0.4-2.1ubuntu1_i386.deb libmms0_0.6.2-3ubuntu2_i386.deb libmodplug1_1%3a0.8.8.4-4.1_i386.deb libmp3lame0_3.99.5+repack1-3ubuntu1_i386.deb libmpcdec6_2%3a0.1~r459-1ubuntu3_i386.deb libmpeg2-4_0.5.1-5ubuntu1_i386.deb libmpg123-0_1.16.0-1ubuntu1_i386.deb libnm-gtk0_0.9.8.8-0ubuntu4.3_i386.deb libnm-gtk-common_0.9.8.8-0ubuntu4.3_all.deb libnspr4-0d_2%3a4.10.7-0ubuntu0.14.04.1_i386.deb libnspr4_2%3a4.10.7-0ubuntu0.14.04.1_i386.deb libnss3-1d_2%3a3.17.1-0ubuntu0.14.04.1_i386.deb libnss3_2%3a3.17.1-0ubuntu0.14.04.1_i386.deb libnss3-nssdb_2%3a3.17.1-0ubuntu0.14.04.1_all.deb libofa0_0.9.3-5ubuntu1_i386.deb liboil0.3_0.3.17-2ubuntu4_i386.deb libopenal1_1%3a1.14-4ubuntu1_i386.deb libopenal-data_1%3a1.14-4ubuntu1_all.deb libopencore-amrnb0_0.1.3-2ubuntu1_i386.deb libopencore-amrwb0_0.1.3-2ubuntu1_i386.deb libopencv-calib3d2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-contrib2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-core2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-features2d2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-flann2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-highgui2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-imgproc2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-legacy2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-ml2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-objdetect2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopencv-video2.4_2.4.8+dfsg1-2ubuntu1_i386.deb libopenexr6_1.6.1-7ubuntu1_i386.deb libopenjpeg2_1.3+dfsg-4.7ubuntu1_i386.deb libopus0_1.1-0ubuntu1_i386.deb liboxideqtcore0_1.1.2-0ubuntu0.14.04.1_i386.deb libpam-systemd_204-5ubuntu20.6_i386.deb libreoffice-base-core_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-calc_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-common_1%3a4.2.6.3-0ubuntu1_all.deb libreoffice-core_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-draw_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-gnome_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-gtk_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-help-en-us_1%3a4.2.6.3-0ubuntu1_all.deb libreoffice-help-fr_1%3a4.2.6.3-0ubuntu1_all.deb libreoffice-impress_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-l10n-fr_1%3a4.2.6.3-0ubuntu1_all.deb libreoffice-math_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-ogltrans_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-pdfimport_1%3a4.2.6.3-0ubuntu1_i386.deb libreoffice-style-human_1%3a4.2.6.3-0ubuntu1_all.deb libreoffice-writer_1%3a4.2.6.3-0ubuntu1_i386.deb libschroedinger-1.0-0_1.0.11-2ubuntu1_i386.deb libsidplay1_1.36.59-5ubuntu1_i386.deb libslv2-9_0.6.6+dfsg1-2_i386.deb libsmbclient_2%3a4.1.6+dfsg-1ubuntu2.14.04.3_i386.deb libsoundtouch0_1.7.1-5_i386.deb libspandsp2_0.0.6~pre21-2_i386.deb libsrtp0_1.4.5~20130609~dfsg-1_i386.deb libssh2-1_1.4.3-2_i386.deb libssl1.0.0_1.0.1f-1ubuntu2.5_i386.deb libswscale2_6%3a9.16-0ubuntu0.14.04.1_i386.deb libsystemd-daemon0_204-5ubuntu20.6_i386.deb libsystemd-journal0_204-5ubuntu20.6_i386.deb libsystemd-login0_204-5ubuntu20.6_i386.deb libtbb2_4.2~20130725-1.1ubuntu1_i386.deb libts-0.0-0_1.0-12_i386.deb libtwolame0_0.3.13-1ubuntu1_i386.deb libudev1_204-5ubuntu20.6_i386.deb libunity-gtk2-parser0_0.0.0+14.04.20140403-0ubuntu2_i386.deb libunity-gtk3-parser0_0.0.0+14.04.20140403-0ubuntu2_i386.deb libva1_1.3.0-2_i386.deb libvo-aacenc0_0.1.3-1_i386.deb libvo-amrwbenc0_0.1.3-1_i386.deb libwbclient0_2%3a4.1.6+dfsg-1ubuntu2.14.04.3_i386.deb libwebkitgtk-3.0-0_2.4.4-1~ubuntu1_i386.deb libwebkitgtk-3.0-common_2.4.4-1~ubuntu1_all.deb libwildmidi1_0.2.3.4-2.1ubuntu3_i386.deb libwildmidi-config_0.2.3.4-2.1ubuntu3_all.deb libx264-142_2%3a0.142.2389+git956c8d8-2_i386.deb libxvidcore4_2%3a1.3.2-9ubuntu1_i386.deb libzbar0_0.10+doc-9build1_i386.deb libzvbi0_0.2.35-2_i386.deb libzvbi-common_0.2.35-2_all.deb linux-libc-dev_3.13.0-36.63_i386.deb lock mc_3%3a4.8.11-1_i386.deb mc-data_3%3a4.8.11-1_all.deb myspell-en-au_2.1-5.4_all.deb myspell-en-gb_1%3a4.2.1-0ubuntu1_all.deb myspell-en-za_1%3a4.2.1-0ubuntu1_all.deb mythes-en-us_1%3a4.2.1-0ubuntu1_all.deb mythes-fr_1%3a4.2.1-0ubuntu1_all.deb net-tools_1.60-25ubuntu2.1_i386.deb network-manager-gnome_0.9.8.8-0ubuntu4.3_i386.deb openoffice.org-hyphenation_0.7_all.deb oxideqt-codecs-extra_1.1.2-0ubuntu0.14.04.1_i386.deb partial python3-apport_2.14.1-0ubuntu3.4_all.deb python3-aptdaemon_1.1.1-1ubuntu5.1_all.deb python3-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.1_all.deb python3-aptdaemon.pkcompat_1.1.1-1ubuntu5.1_all.deb python3-distupgrade_1%3a0.220.5_all.deb python3-gi_3.12.0-1ubuntu1_i386.deb python3-gi-cairo_3.12.0-1ubuntu1_i386.deb python3-problem-report_2.14.1-0ubuntu3.4_all.deb python3-uno_1%3a4.2.6.3-0ubuntu1_i386.deb python-aptdaemon_1.1.1-1ubuntu5.1_all.deb python-aptdaemon.gtk3widgets_1.1.1-1ubuntu5.1_all.deb python-gi_3.12.0-1ubuntu1_i386.deb python-gi-cairo_3.12.0-1ubuntu1_i386.deb python-gobject_3.12.0-1ubuntu1_all.deb rsyslog_7.4.4-1ubuntu2.1_i386.deb samba-common-bin_2%3a4.1.6+dfsg-1ubuntu2.14.04.3_i386.deb shotwell_0.18.0-0ubuntu4.2_i386.deb shotwell-common_0.18.0-0ubuntu4.2_all.deb smbclient_2%3a4.1.6+dfsg-1ubuntu2.14.04.3_i386.deb systemd-services_204-5ubuntu20.6_i386.deb thunderbird_1%3a31.1.2+build1-0ubuntu0.14.04.1_i386.deb thunderbird-gnome-support_1%3a31.1.2+build1-0ubuntu0.14.04.1_i386.deb thunderbird-locale-en_1%3a31.1.2+build1-0ubuntu0.14.04.1_i386.deb thunderbird-locale-en-us_1%3a31.1.2+build1-0ubuntu0.14.04.1_all.deb thunderbird-locale-fr_1%3a31.1.2+build1-0ubuntu0.14.04.1_i386.deb tsconf_1.0-12_all.deb ubiquity_2.18.8.2_i386.deb ubiquity-frontend-gtk_2.18.8.2_i386.deb ubiquity-slideshow-ubuntu_83.1_all.deb ubiquity-ubuntu-artwork_2.18.8.2_all.deb ubuntu-drivers-common_1%3a0.2.91.7_i386.deb ubuntu-release-upgrader-core_1%3a0.220.5_all.deb ubuntu-release-upgrader-gtk_1%3a0.220.5_all.deb ubuntu-restricted-addons_20_i386.deb udev_204-5ubuntu20.6_i386.deb unity-gtk2-module_0.0.0+14.04.20140403-0ubuntu2_i386.deb unity-gtk3-module_0.0.0+14.04.20140403-0ubuntu2_i386.deb unity-gtk-module-common_0.0.0+14.04.20140403-0ubuntu2_all.deb uno-libs3_4.2.6.3-0ubuntu1_i386.deb ure_4.2.6.3-0ubuntu1_i386.deb usb-creator-common_0.2.56.2_i386.deb usb-creator-gtk_0.2.56.2_i386.deb wbritish_7.1-1_all.deb wfrench_1.2.3-10_all.deb xserver-common_2%3a1.15.1-0ubuntu2.1_all.deb xserver-xorg-core_2%3a1.15.1-0ubuntu2.1_i386.deb xserver-xorg-video-intel_2%3a2.99.910-0ubuntu1.1_i386.deb
Pour nettoyer le cache il convient d'utiliser la commande suivante :
root@ubuntu:~# apt-get clean root@ubuntu:~# ls /var/cache/apt/archives/ lock partial
Pour mettre à jour les paquets déjà installés, il convient d'utiliser une de deux commandes apt-get :
La première commande met à jour les paquets déjà installés :
root@ubuntu:~# apt-get upgrade Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Calcul de la mise à jour... Fait Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires : libssh2-1 mc-data Veuillez utiliser « apt-get autoremove » pour les supprimer. Les paquets suivants ont été conservés : linux-generic linux-headers-generic linux-image-generic Les paquets suivants seront mis à jour : accountsservice apport apport-gtk apt apt-transport-https apt-utils aptdaemon aptdaemon-data bash cups cups-bsd cups-client cups-common cups-core-drivers cups-daemon cups-ppdc cups-server-common dbus dbus-x11 evolution-data-server evolution-data-server-common evolution-data-server-online-accounts firefox flashplugin-installer fonts-droid fonts-opensymbol gcc-4.9-base gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2 gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-gtk-3.0 gir1.2-gudev-1.0 gir1.2-javascriptcoregtk-3.0 gir1.2-webkit-3.0 hyphen-fr irqbalance krb5-locales language-selector-common language-selector-gnome libaccountsservice0 libapt-inst1.5 libapt-pkg4.12 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcamel-1.2-45 libcups2 libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3 libcurl3-gnutls libdbus-1-3 libebackend-1.2-7 libebook-1.2-14 libebook-contacts-1.2-0 libecal-1.2-16 libedata-book-1.2-20 libedata-cal-1.2-23 libedataserver-1.2-18 libgail-3-0 libgcc1 libgcrypt11 libgirepository-1.0-1 libgpgme11 libgssapi-krb5-2 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libharfbuzz-icu0 libharfbuzz0b libjavascriptcoregtk-3.0-0 libk5crypto3 libkrb5-3 libkrb5support0 liblzo2-2 libnm-gtk-common libnm-gtk0 libnss3 libnss3-1d libnss3-nssdb liboxideqt-qmlplugin libpam-systemd libreoffice-avmedia-backend-gstreamer libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-style-human libsmbclient libssl1.0.0 libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 libudev1 libunity-control-center1 libunity-core-6.0-9 libunity-gtk2-parser0 libunity-gtk3-parser0 libvncserver0 libwbclient0 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common linux-firmware linux-libc-dev multiarch-support myspell-en-gb myspell-en-za mythes-en-us mythes-fr net-tools network-manager-gnome openoffice.org-hyphenation openssl python-aptdaemon python-aptdaemon.gtk3widgets python-gi python-gi-cairo python-gobject python-samba python3-apport python3-aptdaemon python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat python3-distupgrade python3-gi python3-gi-cairo python3-problem-report rsyslog samba-common samba-common-bin samba-libs shotwell shotwell-common smbclient systemd-services ubuntu-drivers-common ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk udev unity unity-control-center unity-gtk-module-common unity-gtk2-module unity-gtk3-module unity-services uno-libs3 ure usb-creator-common usb-creator-gtk xserver-common xserver-xorg-core xserver-xorg-video-intel 158 mis à jour, 0 nouvellement installés, 0 à enlever et 3 non mis à jour. Il est nécessaire de prendre 115 Mo dans les archives. Après cette opération, 2 513 ko d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n]
Répondez n à la question Souhaitez-vous continuer ? [O/n].
La deuxième commande met à jour une distribution complète, c'est-à-dire d'installer les mises à jour des paquets déjà installés et installer des nouveaux paquets ainsi que leur dépendances :
root@ubuntu:~# apt-get dist-upgrade Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Calcul de la mise à jour... Fait Les paquets suivants ont été installés automatiquement et ne sont plus nécessaires : libssh2-1 mc-data Veuillez utiliser « apt-get autoremove » pour les supprimer. Les NOUVEAUX paquets suivants seront installés : linux-headers-3.13.0-36 linux-headers-3.13.0-36-generic linux-image-3.13.0-36-generic linux-image-extra-3.13.0-36-generic Les paquets suivants seront mis à jour : accountsservice apport apport-gtk apt apt-transport-https apt-utils aptdaemon aptdaemon-data bash cups cups-bsd cups-client cups-common cups-core-drivers cups-daemon cups-ppdc cups-server-common dbus dbus-x11 evolution-data-server evolution-data-server-common evolution-data-server-online-accounts firefox flashplugin-installer fonts-droid fonts-opensymbol gcc-4.9-base gir1.2-ebook-1.2 gir1.2-ebookcontacts-1.2 gir1.2-edataserver-1.2 gir1.2-freedesktop gir1.2-glib-2.0 gir1.2-gtk-3.0 gir1.2-gudev-1.0 gir1.2-javascriptcoregtk-3.0 gir1.2-webkit-3.0 hyphen-fr irqbalance krb5-locales language-selector-common language-selector-gnome libaccountsservice0 libapt-inst1.5 libapt-pkg4.12 libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libcamel-1.2-45 libcups2 libcupscgi1 libcupsimage2 libcupsmime1 libcupsppdc1 libcurl3 libcurl3-gnutls libdbus-1-3 libebackend-1.2-7 libebook-1.2-14 libebook-contacts-1.2-0 libecal-1.2-16 libedata-book-1.2-20 libedata-cal-1.2-23 libedataserver-1.2-18 libgail-3-0 libgcc1 libgcrypt11 libgirepository-1.0-1 libgpgme11 libgssapi-krb5-2 libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libharfbuzz-icu0 libharfbuzz0b libjavascriptcoregtk-3.0-0 libk5crypto3 libkrb5-3 libkrb5support0 liblzo2-2 libnm-gtk-common libnm-gtk0 libnss3 libnss3-1d libnss3-nssdb liboxideqt-qmlplugin libpam-systemd libreoffice-avmedia-backend-gstreamer libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-style-human libsmbclient libssl1.0.0 libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 libudev1 libunity-control-center1 libunity-core-6.0-9 libunity-gtk2-parser0 libunity-gtk3-parser0 libvncserver0 libwbclient0 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common linux-firmware linux-generic linux-headers-generic linux-image-generic linux-libc-dev multiarch-support myspell-en-gb myspell-en-za mythes-en-us mythes-fr net-tools network-manager-gnome openoffice.org-hyphenation openssl python-aptdaemon python-aptdaemon.gtk3widgets python-gi python-gi-cairo python-gobject python-samba python3-apport python3-aptdaemon python3-aptdaemon.gtk3widgets python3-aptdaemon.pkcompat python3-distupgrade python3-gi python3-gi-cairo python3-problem-report rsyslog samba-common samba-common-bin samba-libs shotwell shotwell-common smbclient systemd-services ubuntu-drivers-common ubuntu-release-upgrader-core ubuntu-release-upgrader-gtk udev unity unity-control-center unity-gtk-module-common unity-gtk2-module unity-gtk3-module unity-services uno-libs3 ure usb-creator-common usb-creator-gtk xserver-common xserver-xorg-core xserver-xorg-video-intel 161 mis à jour, 4 nouvellement installés, 0 à enlever et 0 non mis à jour. Il est nécessaire de prendre 176 Mo dans les archives. Après cette opération, 225 Mo d'espace disque supplémentaires seront utilisés. Souhaitez-vous continuer ? [O/n]
Répondez n à la question Souhaitez-vous continuer ? [O/n]. Consultez ensuite l'APT HOWTO pour vous renseigner sur les autres commandes et options.
La commande apt-cache permet de se renseigner sur les paquetages connus à APT.
La commande apt-get prend la forme suivante :
# apt-cache <options> <commande> <paquet(s)> [Entrée]
Les options et les commandes de la commande apt-cache sont :
root@ubuntu:~# apt-cache --help apt 1.0.1ubuntu2 pour i386 compilé sur Jun 13 2014 17:41:42 Usage : apt-cache [options] commande apt-cache [options] showpkg pkg1 [pkg2 ...] apt-cache [options] showsrc pkg1 [pkg2 ...] apt-cache est un outil de bas niveau pour manipuler les fichiers de cache pour les binaires, et pour en obtenir des informations. Commandes : gencaches - Construit le cache des sources et celui des binaires showpkg - Affiche quelques informations générales pour un unique paquet showsrc - Affiche les enregistrements des sources stats - Affiche quelques statistiques de base dump - Affiche la totalité des fichiers dans un formulaire succinct dumpavail - Affiche une liste de fichiers disponibles sur la sortie standard unmet - Affiche les dépendances manquantes search - Cherche une expression rationnelle dans la liste des paquets show - Affiche la description du paquet depends - Affiche toutes les dépendances d'un paquet rdepends - Affiche les dépendances inverses d'un paquet pkgnames - Liste le nom de tous les paquets du système dotty - Génère un graphe des paquets pour GraphViz xvcg - Génère un graphe des paquets pour xvcg policy - Affiche l'épinglage (Pin) en vigueur Options : -h Ce texte d'aide -p=? Le cache des paquets -s=? Le cache des sources -q Enlève l'indicateur de progression -i Affiche seulement les dépendances importantes pour la commande « unmet » -c=? Lit ce fichier de configuration -o=? Spécifie une option de configuration, p. ex. -o dir::cache=/tmp Veuillez consulter les pages de manuel de apt-cache(8) et apt.conf(5) pour plus d'informations.
Les commandes les plus utilisées d'apt-cache sont :
Commande | Description |
---|---|
stats | Affiche quelques statistiques de base. |
search | Cherche une expression rationnelle dans la liste des paquets. |
show | Affiche la description du paquet. |
depends | Affiche toutes les dépendances d'un paquet. |
Utilisez la commande stats de la commande apt-cache pour obtenir des statistiques sur les paquets :
root@ubuntu:~# apt-cache stats Nombre total de paquets : 57354 (1 147 k) Nombre total de structures de paquets : 57354 (2 753 k) Paquets ordinaires : 44660 Paquets entièrement virtuels : 652 Paquets virtuels simples : 4385 Paquets virtuels mixtes : 471 Manquants : 7186 Nombre de versions distinctes : 48618 (3 112 k) Nombre de descriptions distinctes : 122378 (2 937 k) Nombre de dépendances : 290760 (8 141 k) Nombre de relations version/fichier : 51457 (823 k) Nombre de relations description/fichier : 122378 (1 958 k) Nombre de relations « Provides » : 8321 (166 k) Nombre de motifs rationnels : 163 (2 157 ) Espace occupé par les versions des dépendances : 1 363 k Espace disque gaspillé : 46,4 k Total de l'espace attribué : 15,0 M
Utilisez le manuel d'apt-cache pour trouver les définitions des termes Paquets ordinaires, Paquets entièrement virtuels, Paquets virtuels simples et Paquets virtuels mixtes.
Recherchez maintenant la chaîne mc dans la liste des paquets :
root@ubuntu:~# apt-cache search mc | more mono-gmcs - Mono C# 2.0 and C# 3.0 compiler for CLI 2.0 (transitional package) nginx-core - nginx web/proxy server (core version) strongswan-tnc-base - strongSwan Trusted Network Connect's (TNC) - base files strongswan-tnc-client - strongSwan Trusted Network Connect's (TNC) - client files freeipmi-tools - Implémentation GNU du protocole IPMI - outils gcj-4.8 - bytecode GCJ et compilateur natif pour Java (TM) google-mock - Environnement applicatif crée par Google permettant d'écrire et d'utiliser des classes C++ factices kdump-tools - Scripts et outils pour automatiser kdump (empreintes mémoires de plantage Linux) libchewing3 - bibliothèque de méthode de saisie phonétique intelligente libchewing3-data - bibliothèque phonétique d'entrée intelligente - fichiers de données libchewing3-dbg - bibliothèque de méthode de saisie phonétique intelligente - fichiers de débogage libchewing3-dev - bibliothèque phonétique d'entrée intelligente (version de développement) libcrmcluster4 - Bibliothèques Pacemaker - CRM libcrmcluster4-dev - Fichier de développement pour la bibliothèque crm de pacemaker libcrmcommon3 - Bibliothèques Pacemaker - CRM commun libcrmcommon3-dev - Fichier de développement pour la bibliothèque common de pacemaker libdlmcontrol-dev - DLM - fichiers de développement du gestionnaire de verrous distribués libdlmcontrol3 - DLM - bibliothèque du gestionnaire de verrous distribués libhamcrest-java - Bibliothèque de correspondances pour la construction d'expressions de test libhamcrest-java-doc - bibliothèque d'opérateurs de correspondance pour construire des expressions de test - documentation libhashkit-dev - Fonctions de hachage et algorithmes libmemcached (fichiers de développement) libhashkit2 - Fonctions de hachage et algorithmes libmemcached libmemcached-dbg - Symboles de débogage pour libmemcached libmemcached-dev - Bibliothèque client C et C++ pour le serveur memcached (fichiers de développement) libmemcached-tools - Outils en ligne de commande pour parler à memcached via libmemcached libmemcached10 - Bibliothèque client C et C++ pour le serveur memcached libmemcachedprotocol0 - Bibliothèque implémentant le protocole memcached libmemcachedutil2 - bibliothèque de mise en œuvre de la mutualisation de connexion pour libmemcached libservlet3.0-java - Classes de l'API Java Servlet 3.0 et JSP 2.2 libservlet3.0-java-doc - Documentation de l'API Java Servlet 3.0 et JSP 2.2 libtomcat7-java - Moteur de servlet et JSP - bibliothèques de base libwvstreams4.6-base - Bibliothèques C++ réseau pour le développement rapide d'applications libxcb-xvmc0 - X C Binding, extension xvmc libxcb-xvmc0-dbg - X C Binding, extension xvmc, symboles de débogage --Plus--
Pour être plus précis dans la recherche, il est nécessaire de rechercher une phrase clef :
root@ubuntu:~# apt-cache search "midnight commander" avfs - système de fichiers virtuel pour accéder aux archives, images disque, endroits distants gnome-commander - gestionnaires de fichiers pour GNOME gnome-commander-data - Fichiers de données pour GNOME Commander gnome-commander-dbg - Symboles de débogage pour gnome-commander junior-system - Outils systèmes Debian Jr. krusader - gestionnaire de fichiers à double panneau (de type commander) lfm - gestionnaire de fichiers simple et puissant pour la console UNIX mc - Midnight Commander - gestionnaire de fichiers évolué mc-data - Midnight Commander - un puissant gestionnaire de fichiers - fichiers de données mc-dbg - Midnight Commander - un puissant gestionnaire de fichiers - paquet de débogage pilot - Navigateur simple de fichiers pour Alpine, client de courriel en mode texte tuxcmd - gestionnaire de fichiers à double panneau (de type commander) utilisant GTK+2
Afficher maintenant les informations concernant le paquet mc :
root@ubuntu:~# apt-cache show mc Package: mc Priority: optional Section: universe/utils Installed-Size: 1420 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original-Maintainer: Debian MC Packaging Group <pkg-mc-devel@lists.alioth.debian.org> Architecture: i386 Version: 3:4.8.11-1 Provides: mcedit Depends: e2fslibs (>= 1.37), libc6 (>= 2.15), libglib2.0-0 (>= 2.35.9), libgpm2 (>= 1.20.4), libslang2 (>= 2.2.4), libssh2-1 (>= 1.2.5), mc-data (= 3:4.8.11-1) Recommends: mime-support, perl, unzip Suggests: arj, bzip2, catdvi | texlive-binaries, dbview, djvulibre-bin, file, genisoimage, gv, imagemagick, links | w3m | lynx, odt2txt, poppler-utils, python, python-boto, python-tz, xpdf | pdf-viewer, zip Filename: pool/universe/m/mc/mc_4.8.11-1_i386.deb Size: 454158 MD5sum: 4b7005f139a12b6d2fdf1effe84c9eb1 SHA1: 0fa89fb4f9bd3800d1d3d36bd0d0f36c20ccd943 SHA256: f56a4bdec6e9ba1db288fb83106402a7490031933c50c9656ab56be6adfcf0a4 Description-fr: Midnight Commander - gestionnaire de fichiers évolué GNU Midnight Commander est un gestionnaire de fichiers en mode texte plein écran. Il utilise une interface à deux volets et un sous-shell pour l'exécution de commandes. Il comporte un éditeur de fichiers avec colorisation syntaxique ainsi qu'un afficheur de fichiers gérant les fichiers binaires. Il fournit également VFS (« Virtual Filesystem », système de fichiers virtuel) qui permet de manipuler les fichiers situés sur des systèmes distants (p. ex. de serveurs FTP ou SSH) ainsi que les fichiers inclus dans des archives. Description-md5: 252a5c5aeeb7425db45357d4ab8aa55f Homepage: http://www.midnight-commander.org Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu
Dernièrement, visualisez les dépendances du paquet mc :
root@ubuntu:~# apt-cache depends mc mc Dépend: e2fslibs Dépend: libc6 Dépend: libglib2.0-0 Dépend: libgpm2 Dépend: libslang2 Dépend: libssh2-1 Dépend: mc-data Suggère: arj Suggère: bzip2 |Suggère: catdvi Suggère: texlive-binaries Suggère: dbview Suggère: djvulibre-bin Suggère: file Suggère: genisoimage Suggère: gv Suggère: imagemagick graphicsmagick-imagemagick-compat |Suggère: links |Suggère: w3m Suggère: lynx Suggère: odt2txt Suggère: poppler-utils Suggère: python Suggère: python-boto Suggère: python-tz |Suggère: xpdf Suggère: <pdf-viewer> okular active-documentviewer evince evince-gtk gv mupdf viewpdf.app xpdf zathura Suggère: zip Recommande: mime-support Recommande: perl Recommande: unzip
Les bibliothèques partagées sont des fonctions communes à plusieurs programmes différents d'un même domaine (son, base de données, vidéo etc.). Les fonctions proposées par une ou plusieurs bibliothèques forment un API (Application Programming Interface). Sous Linux les bibliothèques se nomment Shared Objects et portent le suffixe .so.
Les bibliothèques partagées sont stockées par convention dans des répertoires lib, par exemple :
Répertoire | Contenu |
---|---|
/lib | Bibliothèques du système de base |
/usr/lib | Bibliothèques utilisateurs |
/usr/local/lib | Bibliothèques locales |
/usr/X11R6/lib | Bibliothèques de l'environnement X |
/opt/kde4/lib | Bibliothèques de KDE |
La bibliothèque la plus importante est libc. Sans elle, le système Linux ne peut pas fonctionner.
La bibliothèque ld-linux.so.2 est utilisée par le système pour créer un lien avec une bibliothèque partagée au moment de l'exécution d'un programme et s'appelle le chargeur de liens. Ce dernier recherche des bibliothèques partagées dans un ordre précis :
Il est à noter que le contenu du cache ld.so.cache est construit à partir des informations contenus dans le fichier de configuration /etc/ld.so.conf.
Afin d'étudier les bibliothèques liées à une application, nous allons d'abord installer l'application mc, un explorateur de fichiers en mode console :
root@ubuntu:~# apt-get install mc Lecture des listes de paquets... Fait Construction de l'arbre des dépendances Lecture des informations d'état... Fait Paquets suggérés : arj catdvi texlive-binaries dbview djvulibre-bin gv imagemagick links w3m lynx odt2txt python-boto python-tz Les NOUVEAUX paquets suivants seront installés : mc 0 mis à jour, 1 nouvellement installés, 0 à enlever et 161 non mis à jour. Il est nécessaire de prendre 454 ko dans les archives. Après cette opération, 1 454 ko d'espace disque supplémentaires seront utilisés. Réception de : 1 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe mc i386 3:4.8.11-1 [454 kB] 454 ko réceptionnés en 1s (423 ko/s) Sélection du paquet mc précédemment désélectionné. (Lecture de la base de données... 167965 fichiers et répertoires déjà installés.) Préparation du décompactage de .../mc_3%3a4.8.11-1_i386.deb ... Décompactage de mc (3:4.8.11-1) ... Traitement déclenché pour gnome-menus (3.10.1-0ubuntu2) ... Traitement déclenché pour desktop-file-utils (0.22-1ubuntu1) ... Traitement déclenché pour bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Traitement déclenché pour mime-support (3.54ubuntu1) ... Paramétrage de mc (3:4.8.11-1) ... update-alternatives: utilisation de « /usr/bin/mcview » pour fournir « /usr/bin/view » (view) en mode automatique
Pour déterminer quelles sont les bibliothèques liées à une application, il convient d'utiliser la commande ldd :
root@ubuntu:~# ldd /usr/bin/mc linux-gate.so.1 => (0xb77ac000) libslang.so.2 => /lib/i386-linux-gnu/libslang.so.2 (0xb753e000) libgpm.so.2 => /usr/lib/i386-linux-gnu/libgpm.so.2 (0xb7537000) libext2fs.so.2 => /lib/i386-linux-gnu/libext2fs.so.2 (0xb74ee000) libssh2.so.1 => /usr/lib/i386-linux-gnu/libssh2.so.1 (0xb74c5000) libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xb74c0000) libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb73b4000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7398000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb71e8000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb71e3000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb719d000) libcom_err.so.2 => /lib/i386-linux-gnu/libcom_err.so.2 (0xb7198000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb717e000) libgcrypt.so.11 => /lib/i386-linux-gnu/libgcrypt.so.11 (0xb70f7000) libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb70b9000) /lib/ld-linux.so.2 (0xb77ad000) libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb70b4000)
Afin de comprendre ce qui se passe dans le cas où une bibliothèque est manquante, renommez la bibliothèque /usr/lib/i386-linux-gnu/libgpm.so.2 en /usr/lib/i386-linux-gnu/libgpm.so.2.old :
root@ubuntu:~# mv /usr/lib/i386-linux-gnu/libgpm.so.2 /usr/lib/i386-linux-gnu/libgpm.so.2.old
Exécutez de nouveau la commande ldd. Vous obtiendrez un résultat similaire à celui-ci :
root@ubuntu:~# ldd /usr/bin/mc linux-gate.so.1 => (0xb77a5000) libslang.so.2 => /lib/i386-linux-gnu/libslang.so.2 (0xb7537000) libgpm.so.2 => not found libext2fs.so.2 => /lib/i386-linux-gnu/libext2fs.so.2 (0xb74ee000) libssh2.so.1 => /usr/lib/i386-linux-gnu/libssh2.so.1 (0xb74c5000) libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xb74c0000) libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb73b4000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7398000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb71e8000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb71e3000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb719d000) libcom_err.so.2 => /lib/i386-linux-gnu/libcom_err.so.2 (0xb7198000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb717e000) libgcrypt.so.11 => /lib/i386-linux-gnu/libgcrypt.so.11 (0xb70f7000) libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb70b9000) /lib/ld-linux.so.2 (0xb77a6000) libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb70b4000)
Notez la présence de la ligne libgpm.so.2 ⇒ not found. Compte tenu de la bibliothèque partagée manquante, le programme mc ne peut plus être lancé :
root@ubuntu:~# mc mc: error while loading shared libraries: libgpm.so.2: cannot open shared object file: No such file or directory
Renommez la bibliothèque correctement et vérifiez la résolution de l'erreur précédente avec la commande ldd :
root@ubuntu:~# mv /usr/lib/i386-linux-gnu/libgpm.so.2.old /usr/lib/i386-linux-gnu/libgpm.so.2 root@ubuntu:~# ldd /usr/bin/mc linux-gate.so.1 => (0xb7720000) libslang.so.2 => /lib/i386-linux-gnu/libslang.so.2 (0xb74b2000) libgpm.so.2 => /usr/lib/i386-linux-gnu/libgpm.so.2 (0xb74ab000) libext2fs.so.2 => /lib/i386-linux-gnu/libext2fs.so.2 (0xb7462000) libssh2.so.1 => /usr/lib/i386-linux-gnu/libssh2.so.1 (0xb7439000) libgmodule-2.0.so.0 => /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0xb7434000) libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb7328000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb730c000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb715c000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7157000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7111000) libcom_err.so.2 => /lib/i386-linux-gnu/libcom_err.so.2 (0xb710c000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb70f2000) libgcrypt.so.11 => /lib/i386-linux-gnu/libgcrypt.so.11 (0xb706b000) libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb702d000) /lib/ld-linux.so.2 (0xb7721000) libgpg-error.so.0 => /lib/i386-linux-gnu/libgpg-error.so.0 (0xb7028000)
Le fichier /etc/ld.so.conf est utilisé pour configurer le cache /etc/ld.so.cache :
root@ubuntu:~# cat /etc/ld.so.conf include /etc/ld.so.conf.d/*.conf
Dans ce cas, le fichier ne contient qu'une directive include qui renvoie vers le contenu du répertoire /etc/ld.so.conf.d/ :
root@ubuntu:~# ls -l /etc/ld.so.conf.d/ total 8 lrwxrwxrwx 1 root root 41 sept. 27 18:11 i386-linux-gnu_EGL.conf -> /etc/alternatives/i386-linux-gnu_egl_conf lrwxrwxrwx 1 root root 40 sept. 27 18:11 i386-linux-gnu_GL.conf -> /etc/alternatives/i386-linux-gnu_gl_conf -rw-r--r-- 1 root root 108 avril 12 12:40 i686-linux-gnu.conf -rw-r--r-- 1 root root 44 août 9 2009 libc.conf
Le contenu de ces deux fichiers est le suivant :
root@ubuntu:~# cat /etc/ld.so.conf.d/i386-linux-gnu_EGL.conf /usr/lib/i386-linux-gnu/mesa-egl root@ubuntu:~# cat /etc/ld.so.conf.d/i386-linux-gnu_GL.conf /usr/lib/i386-linux-gnu/mesa root@ubuntu:~# cat /etc/ld.so.conf.d/i686-linux-gnu.conf # Multiarch support /lib/i386-linux-gnu /usr/lib/i386-linux-gnu /lib/i686-linux-gnu /usr/lib/i686-linux-gnu root@ubuntu:~# cat /etc/ld.so.conf.d/libc.conf # libc default configuration /usr/local/lib
La commande ldconfig est utilisée pour :
Les liens symboliques sont utilisés pour gérer les versions de bibliothèques.
La commande ldconfig peut être utilisée avec l'option -p pour visualiser le contenu du cache :
root@ubuntu:~# ldconfig -p | more 950 libs trouvé dans le cache « /etc/ld.so.cache » libzvbi.so.0 (libc6) => /usr/lib/i386-linux-gnu/libzvbi.so.0 libzvbi-chains.so.0 (libc6) => /usr/lib/i386-linux-gnu/libzvbi-chains.so.0 libzephyr.so.4 (libc6) => /usr/lib/i386-linux-gnu/libzephyr.so.4 libzeitgeist-2.0.so.0 (libc6) => /usr/lib/i386-linux-gnu/libzeitgeist-2.0.so.0 libzeitgeist-1.0.so.1 (libc6) => /usr/lib/libzeitgeist-1.0.so.1 libzbar.so.0 (libc6) => /usr/lib/libzbar.so.0 libz.so.1 (libc6) => /lib/i386-linux-gnu/libz.so.1 libyelp.so.0 (libc6) => /usr/lib/libyelp.so.0 libyajl.so.2 (libc6) => /usr/lib/i386-linux-gnu/libyajl.so.2 libx264.so.142 (libc6, hwcap: 0x0008000004000000) => /usr/lib/i386-linux-gnu/i686/sse2/libx264.so.142 libx264.so.142 (libc6) => /usr/lib/i386-linux-gnu/libx264.so.142 libx86.so.1 (libc6) => /lib/i386-linux-gnu/libx86.so.1 libxvidcore.so.4 (libc6) => /usr/lib/i386-linux-gnu/libxvidcore.so.4 libxtables.so.10 (libc6) => /lib/libxtables.so.10 libxslt.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxslt.so.1 libxshmfence.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxshmfence.so.1 libxml2.so.2 (libc6) => /usr/lib/i386-linux-gnu/libxml2.so.2 libxklavier.so.16 (libc6) => /usr/lib/libxklavier.so.16 libxkbfile.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxkbfile.so.1 libxkbcommon.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxkbcommon.so.0 libxkbcommon-x11.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxkbcommon-x11.so.0 libxcb.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxcb.so.1 libxcb-xkb.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxcb-xkb.so.1 libxcb-xfixes.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-xfixes.so.0 libxcb-util.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-util.so.0 libxcb-sync.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 libxcb-shm.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-shm.so.0 libxcb-shape.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-shape.so.0 libxcb-render.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-render.so.0 libxcb-render-util.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-render-util.so.0 libxcb-randr.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-randr.so.0 libxcb-present.so.0 (libc6) => /usr/lib/i386-linux-gnu/libxcb-present.so.0 libxcb-keysyms.so.1 (libc6) => /usr/lib/i386-linux-gnu/libxcb-keysyms.so.1 --Plus--
Pour ajouter des bibliothèques partagées, il convient de :
<html>
Copyright © 2004-2016 Hugh Norris.<br><br> <a rel=“license” href=“http://creativecommons.org/licenses/by-nc-nd/3.0/fr/”><img alt=“Licence Creative Commons” style=“border-width:0” src=“http://i.creativecommons.org/l/by-nc-nd/3.0/fr/88x31.png” /></a><br />Ce(tte) oeuvre est mise à disposition selon les termes de la <a rel=“license” href=“http://creativecommons.org/licenses/by-nc-nd/3.0/fr/”>Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Pas de Modification 3.0 France</a>.
</html>