Outils pour utilisateurs

Outils du site


tech:debian-apt-maj

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:debian-apt-maj [2025/10/27 18:57] Jean-Baptistetech:debian-apt-maj [2026/05/29 15:41] (Version actuelle) Jean-Baptiste
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>apt Debian PGP}}
 +
 +# Notes Mise à jour Debian
 +
 +Voir 
 +  * [|UnattendedUpgrades](https://wiki.debian.org/UnattendedUpgrades)
 +  * <http://www.pontikis.net/blog/simple-steps-to-update-a-debian-server>
 +
 +~~~
 +apt-get update
 +apt list --upgradable
 +~~~
 +
 +~~~bash
 +apt install apt-show-versions
 +apt-show-versions | grep upgradeable
 +~~~
 +
 +~~~
 +apt-get install update-notifier-common:
 +/usr/lib/update-notifier/apt-check
 +/usr/lib/update-notifier/apt-check --human-readable
 +~~~
 +
 +~~~bash
 +apt-get install debian-goodies
 +checkrestart
 +apt-get install update-notifier-common
 +~~~
 +
 +~~~bash
 +checkrestart |grep ^servi | bash -s --
 +~~~
 +
 +
 +-----
 +
 +<http://unix.stackexchange.com/questions/75807/no-public-key-available-on-apt-get-update>
 +
 +~~~
 +# apt-get update
 +Atteint http://ftp.fr.debian.org squeeze/contrib i386 Packages                                                                                       [63/1807]
 +Ign http://http.debian.net/debian/ squeeze-lts/main Translation-en                       
 +Atteint http://ftp.fr.debian.org squeeze/non-free i386 Packages                          
 +Atteint http://ftp.fr.debian.org squeeze-updates/main Sources/DiffIndex                  
 +Ign http://http.debian.net/debian/ squeeze-lts/main Translation-fr                       
 +Atteint http://http.debian.net squeeze-lts Release.gpg                                   
 +Atteint http://ftp.fr.debian.org squeeze-updates/contrib Sources
 +Réception de : 1 http://http.debian.net squeeze-lts Release [28,7 kB]                      
 +Ign http://http.debian.net squeeze-lts Release                                             
 +Atteint http://http.debian.net squeeze-lts/main Sources/DiffIndex                
 +Ign http://http.debian.net squeeze-lts/main i386 Packages/DiffIndex
 +Atteint http://ftp.fr.debian.org squeeze-updates/main i386 Packages/DiffIndex
 +Atteint http://ftp.fr.debian.org squeeze-updates/contrib i386 Packages                    
 +Atteint http://http.debian.net squeeze-lts/main i386 Packages                             
 +28,7 ko réceptionnés en 1s (26,3 ko/s)                  
 +Lecture des listes de paquets... Fait
 +W: Erreur de GPG : http://http.debian.net squeeze-lts Release : Les signatures suivantes ne sont pas valables : BADSIG 8B48AD6246925553 Debian Archive Automat
 +ic Signing Key (7.0/wheezy) <ftpmaster@debian.org>
 +~~~
 +
 +~~~bash
 +apt-get install debian-keyring debian-archive-keyring
 +apt-get update
 +apt-get upgrade
 +~~~
 +
 +-----
 +
 +apt-get upgrade ouvre parfois une jolie fenêtre quand le maintenaient du paquet propose un fichier de configuration différent que votre fichier actuel. L'interface (debconf !?) proposée par défaut de se prête pas vraiment aux scripts.
 +
 +
 +### Solution 
 +
 +DEBIAN_FRONTEND='text' 
 +
 +~~~bash
 +for SERV in $LISTE_SERV
 +do
 +     ssh root@$SERV 'env DEBIAN_FRONTEND='text' apt-get upgrade -y'
 +done
 +~~~
 +
 +~~~
 +Une nouvelle version du fichier de configuration /etc/samba/smb.conf est 
 +disponible mais la version actuellement utilisée a été modifiée localement.
 +
 +  1. Installer la version du responsable du paquet
 +  2. Garder la version actuellement installée
 +  3. Montrer les différences entre les versions
 +  4. Montrer côte à côte les différences entre les versions
 +  5. Montrer les différences entre les trois versions du fichier
 +  6. Fusionner les trois versions (« 3-way merge » : expérimental)
 +  7. Lancer un shell pour examiner la situation
 +
 +Action souhaitée pour le fichier de configuration modifié smb.conf :
 +~~~
 +
 +
 +Voir :
 +~~~bash
 +export DEBIAN_FRONTEND='noninteractive'
 +~~~
 +
 +~~~bash
 +dpkg-reconfigure --frontend=readline debconf
 +~~~
 +
 +
 +Exit-il des packages plus récent à mettre à jour
 +
 +~~~bash
 +apt list --upgradable
 +~~~
 +
 +Pour les anciennes Debian ?
 +
 +''check_update_apt.sh''
 +~~~bash
 +#! /bin/bash
 +
 +# Package update-notifier-common nécessaire
 +
 +set -o nounset
 +
 +#declare -i recmaj
 +#declare -i secmaj
 +
 +IFS=';' read recmaj secmaj <<< $(/usr/lib/update-notifier/apt-check 2>&1)
 +
 +echo "RECMAJ : $recmaj"
 +echo "SECMAJ : $secmaj"
 +~~~
 +
 +
 +/usr/lib/update-notifier/apt-check du paquet update-notifier-common peur être remplacé par 
 +~~~bash
 +apt-get update
 +LC_ALL=C apt-get -s dist-upgrade | grep "^[[:digit:]]\+ upgraded"
 +~~~
 +
 +
 +## Pb
 +
 +### Err. This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
 +
 +~~~bash
 +apt-get update --allow-releaseinfo-change
 +~~~
 +
 +
 +
 +### Err - The following packages have been kept back - 1 not upgraded
 +
 +~~~
 +# apt-get upgrade
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +Calculating upgrade... Done
 +The following packages have been kept back:
 +  libjson-xs-perl
 +0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 +
 +# apt-get dist-upgrade 
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +Calculating upgrade... Done
 +The following packages have been kept back:
 +  libjson-xs-perl
 +0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 +
 +# apt list --upgradable 
 +libjson-xs-perl/oldstable-security 4.040-1~deb12u1 amd64 [upgradable from: 4.030-2+b5]
 +Notice: There are 2 additional versions. Please use the '-a' switch to see them.
 +# apt-show-versions | grep upgradeable
 +libjson-xs-perl:amd64/testing 4.030-2+b5 upgradeable to 4.040-1~deb12u1
 +# apt-get --with-new-pkgs upgrade
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +Calculating upgrade... Done
 +The following packages have been kept back:
 +  libjson-xs-perl
 +0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
 +
 +# apt-mark showhold
 +
 +
 +# apt upgrade --with-new-pkgs libjson-xs-perl
 +Calculating upgrade... Error!   
 +Some packages could not be installed. This may mean that you have
 +requested an impossible situation or if you are using the unstable
 +distribution that some required packages have not yet been created
 +or been moved out of Incoming.
 +The following information may help to resolve the situation:
 +
 +Unsatisfied dependencies:
 + libjson-xs-perl : Depends: perlapi-5.36.0
 +Error: Unable to correct problems, you have held broken packages.
 +
 +
 +# apt install --only-upgrade  libjson-xs-perl
 +Solving dependencies... Error!  
 +Some packages could not be installed. This may mean that you have
 +requested an impossible situation or if you are using the unstable
 +distribution that some required packages have not yet been created
 +or been moved out of Incoming.
 +The following information may help to resolve the situation:
 +
 +Unsatisfied dependencies:
 + libjson-xs-perl : Depends: perlapi-5.36.0
 +Error: Unable to correct problems, you have held broken packages.
 +Error: The following information from --solver 3.0 may provide additional context:
 +   Unable to satisfy dependencies. Reached two conflicting decisions:
 +   1. libjson-xs-perl:amd64=4.040-1~deb12u1 is selected as an upgrade
 +   2. libjson-xs-perl:amd64=4.040-1~deb12u1 Depends perlapi-5.36.0
 +      but none of the choices are installable:
 +      - perl-base:amd64=5.36.0-7+deb12u3 is not selected for install
 +      - perl-base:amd64=5.36.0-7+deb12u2 is not selected for install
 +      
 +# apt-get purge libjson-xs-perl
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +The following packages were automatically installed and are no longer required:
 +  libcommon-sense-perl libtypes-serialiser-perl
 +Use 'apt autoremove' to remove them.
 +The following packages will be REMOVED:
 +  libjson-xs-perl*
 +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
 +After this operation, 213 kB disk space will be freed.
 +Do you want to continue? [Y/n] Y
 +(Reading database ... 544809 files and directories currently installed.)
 +Removing libjson-xs-perl (4.030-2+b5) ...
 +Processing triggers for man-db (2.13.1-1) ...
 +~~~
 +
 +~~~
 +root@vivabelo:~# LANG=C apt-get dist-upgrade 
 +Reading package lists... Done
 +Building dependency tree... Done
 +Reading state information... Done
 +Calculating upgrade... Done
 +The following packages have been kept back:
 +  libwine libwine:i386 libwine-dev wine wine32:i386 wine64 wine64-tools
 +0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
 +
 +
 +# dpkg --get-selections | grep hold
 +
 +~~~
 +
 +Résolution du problème avec ''aptitude''
 +
 +~~~bash
 +aptitude upgrade
 +~~~
 +
 +ou
 +
 +~~~
 +¿Acepta esta solución? [Y/n/q/?]n               
 +Las acciones siguientes resolverán estas dependencias                                                    
 +                                                                                                         
 +      Eliminar los paquetes siguientes:                                             
 +1)      libavcodec61 [7:7.1.3-1 (now)]                                              
 +                                                    
 +      Instalar los paquetes siguientes:                                             
 +2)      fonts-wine [10.0~repack-6 (stable)]                                         
 +3)      libavcodec-extra61 [7:7.1.3-0+deb13u1 (stable, stable-security)]            
 +4)      libavformat61 [7:7.1.3-0+deb13u1 (stable, stable-security)]                 
 +5)      libbluray2 [1:1.3.4-1+b2 (stable)]                                          
 +6)      libcapi20-3t64 [1:3.27-3.2+b1 (stable)]     
 +7)      libosmesa6 [25.0.7-2 (stable)]                                              
 +8)      librav1e0.7 [0.7.1-9+b2 (stable)]                                                
 +9)      libudfread0 [1.1.2-1+b2 (stable)]                                           
 +10)     libwine [10.0~repack-6 (stable)]                                            
 +11)     libz-mingw-w64 [1.3.1+dfsg-2 (stable)]                                      
 +12)     wine64 [10.0~repack-6 (stable)]             
 +                                                                                                         
 +      Desactualizar los paquetes siguientes:                                        
 +13)     libavutil59 [7:7.1.3-1 (now) -> 7:7.1.3-0+deb13u1 (stable, stable-security)]
 +                                                                                                         
 +      Leave the following dependencies unresolved:                                  
 +14)     wine64 recomienda wine32 (= 10.0~repack-6)
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki