Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 02/03/2023, à 09:35

Lush

Impossible de procéder à des installations ou des mises à jour

Bonjour à tous,

Il y a quelques jours j'ai procédé à la désinstallation de mes paquets Python (2 et 3).
Je gère mes paquets Python avec pyenv.

pyenv versions

  system
  3.8.10
* 3.11.2 (set by /home/sarah/.pyenv/version)

J'utilise le paquet supervisor installé avec apt pour gérer mon site web (Nginx, Django, Gunicorn) : impossible d'utiliser supervisorctl depuis la désinstallation de mes paquets et le passage sur pyenv.

Mais le problème est plus global car il faut que je réussisse à installer les paquets python car ça a cassé la gestion des paquets.

sudo apt clean -v

sudo apt update
sudo apt full-upgrade
sudo apt autoremove --purge
apt 2.4.8 (amd64)
Hit:1 http://mirrors.digitalocean.com/ubuntu focal InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease                         
Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease                               
Hit:4 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease                       
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease                             
Hit:6 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease                
Hit:7 https://packagecloud.io/AtomEditor/atom/any any InRelease                              
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 3, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists... Done
W: https://packagecloud.io/AtomEditor/atom/any/dists/any/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

Chaque action avec apt m'indique ou l'absence du module apt_pkg ou debpython ou le fait que je doive réinstaller python3-apt mais que l'archive est introuvable.

sudo apt-get -s dist-upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

Je suis sur un serveur Digital Ocean avec une distribution Ubuntu 20.04 (LTS) x64.

lshw -c display

WARNING: you should run this program as super-user.
  *-display                 
       description: VGA compatible controller
       product: QXL paravirtual graphic card
       vendor: Red Hat, Inc.
       physical id: 2
       bus info: pci@0000:00:02.0
       logical name: /dev/fb0
       version: 05
       width: 32 bits
       clock: 33MHz
       capabilities: vga_controller rom fb
       configuration: depth=32 driver=qxl latency=0 resolution=1024,768
       resources: irq:11 memory:f8000000-fbffffff memory:fc000000-fcffffff memory:fd010000-fd011fff ioport:c120(size=32) memory:c0000-dffff
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.

sudo dpkg --remove --force-all python3-apt

dpkg: python3-apt: dependency problems, but removing anyway as you requested:
 update-notifier-common depends on python3-apt.
 unattended-upgrades depends on python3-apt (>= 1.9.6~).
 ubuntu-advantage-tools depends on python3-apt.
 python3-update-manager depends on python3-apt (>= 0.8.5~).
 python3-software-properties depends on python3-apt (>= 0.6.20ubuntu16).
 python3-distupgrade depends on python3-apt (>= 0.8.5~).
 python3-commandnotfound depends on python3-apt.
 python3-aptdaemon depends on python3-apt (>= 0.8.5~ubuntu1).
 python3-apport depends on python3-apt (>= 0.7.9).
 language-selector-gnome depends on python3-apt.
 language-selector-common depends on python3-apt (>= 0.7.12.0).
 landscape-common depends on python3-apt.

dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 170834 files and directories currently installed.)
Removing python3-apt (2.4.0ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/py3clean", line 32, in <module>
    from debpython import files as dpf
ModuleNotFoundError: No module named 'debpython'
dpkg: error processing package python3-apt (--remove):
 installed python3-apt package pre-removal script subprocess returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 34, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
ModuleNotFoundError: No module named 'debpython'
dpkg: error while cleaning up:
 installed python3-apt package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-apt

Voici ce que contient sources.list :

cat /etc/apt/sources.list

## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
##     or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.digitalocean.com/ubuntu/ focal main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates main restricted
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-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://mirrors.digitalocean.com/ubuntu/ focal universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal universe
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates universe
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-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://mirrors.digitalocean.com/ubuntu/ focal multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal multiverse
deb http://mirrors.digitalocean.com/ubuntu/ focal-updates multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-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://mirrors.digitalocean.com/ubuntu/ focal-backports main restricted universe multiverse
# deb-src http://mirrors.digitalocean.com/ubuntu/ focal-backports main restricted universe 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 focal partner
# deb-src http://archive.canonical.com/ubuntu focal partner

deb http://security.ubuntu.com/ubuntu focal-security main restricted
# deb-src http://security.ubuntu.com/ubuntu focal-security main restricted
deb http://security.ubuntu.com/ubuntu focal-security universe
# deb-src http://security.ubuntu.com/ubuntu focal-security universe
deb http://security.ubuntu.com/ubuntu focal-security multiverse
# deb-src http://security.ubuntu.com/ubuntu focal-security multiverse

ls -ls /usr/bin/python*

0 lrwxrwxrwx 1 root root 49 Mar  1 08:31 /usr/bin/python3 -> /home/sarah/.pyenv/versions/3.11.2/bin/python3.11
0 lrwxrwxrwx 1 root root 17 Aug 18  2022 /usr/bin/python3-config -> python3.10-config
0 lrwxrwxrwx 1 root root 34 Nov 14 16:10 /usr/bin/python3.10-config -> x86_64-linux-gnu-python3.10-config

python -V

Python 3.11.2

J'utilise ZSH avec oh-my-zsh.

cat ~/.zshrc

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source ~/powerlevel10k/powerlevel10k.zsh-theme
source /home/sarah/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
export PATH=$PATH:/usr/local/go/bin
PATH=/bin:/usr/bin:/usr/local/bin:${PATH}
export PATH
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
alias python='python3'

Il semble donc que je sois dans une boucle infinie dont je ne peux sortir.

Merci pour votre aide !

Dernière modification par Lush (Le 02/03/2023, à 09:39)

Hors ligne

#2 Le 02/03/2023, à 09:40

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Bonjour,

Hit:3 https://download.docker.com/linux/ubuntu jammy InRelease   

 
Il n'y avait pas un docker pour la version 20.04 focal ?

Montre aussi d'éventuels paquets cassés :

dpkg -l | grep -v ^ii

Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#3 Le 02/03/2023, à 09:50

Lush

Re : Impossible de procéder à des installations ou des mises à jour

Voici le retour commande :

dpkg -l | grep -v ^ii

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                                 Architecture Description
+++-=====================================-=======================================-============-================================================================================
rc  at                                    3.2.5-1ubuntu1                          amd64        Delayed job execution and batch processing
rc  bsdmainutils                          12.1.7+nmu3ubuntu2                      all          Transitional package for more utilities from FreeBSD
rc  containerd                            1.5.9-0ubuntu1~20.04.5                  amd64        daemon to control runC
rc  containerd.io                         1.6.18-1                                amd64        An open and reliable container runtime
rc  crda                                  3.18-1build1                            amd64        wireless Central Regulatory Domain Agent
rc  docker.io                             20.10.12-0ubuntu2~20.04.1               amd64        Linux container runtime
rc  fuse                                  2.9.9-3                                 amd64        Filesystem in Userspace
rc  ippusbxd                              1.34-2ubuntu1                           amd64        Daemon for IPP USB printer support
rc  libpython2.7-minimal:amd64            2.7.18-13ubuntu1.1                      amd64        Minimal subset of the Python language (version 2.7)
rc  libpython3.8-minimal:amd64            3.8.10-0ubuntu1~20.04.6                 amd64        Minimal subset of the Python language (version 3.8)
rc  linux-image-5.15.0-56-generic         5.15.0-56.62                            amd64        Signed kernel image generic
rc  linux-image-5.15.0-57-generic         5.15.0-57.63                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-100-generic         5.4.0-100.113                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-104-generic         5.4.0-104.118                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-105-generic         5.4.0-105.119                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-107-generic         5.4.0-107.121                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-109-generic         5.4.0-109.123                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-110-generic         5.4.0-110.124                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-113-generic         5.4.0-113.127                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-117-generic         5.4.0-117.132                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-120-generic         5.4.0-120.136                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-121-generic         5.4.0-121.137                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-122-generic         5.4.0-122.138                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-131-generic         5.4.0-131.147                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-132-generic         5.4.0-132.148                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-135-generic         5.4.0-135.152                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-73-generic          5.4.0-73.82                             amd64        Signed kernel image generic
rc  linux-image-5.4.0-84-generic          5.4.0-84.94                             amd64        Signed kernel image generic
rc  linux-image-5.4.0-86-generic          5.4.0-86.97                             amd64        Signed kernel image generic
rc  linux-image-5.4.0-88-generic          5.4.0-88.99                             amd64        Signed kernel image generic
rc  linux-image-5.4.0-89-generic          5.4.0-89.100                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-90-generic          5.4.0-90.101                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-91-generic          5.4.0-91.102                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-92-generic          5.4.0-92.103                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-94-generic          5.4.0-94.106                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-96-generic          5.4.0-96.109                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-97-generic          5.4.0-97.110                            amd64        Signed kernel image generic
rc  linux-image-5.4.0-99-generic          5.4.0-99.112                            amd64        Signed kernel image generic
rc  linux-modules-5.15.0-56-generic       5.15.0-56.62                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-5.15.0-57-generic       5.15.0-57.63                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-100-generic       5.4.0-100.113                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-104-generic       5.4.0-104.118                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-105-generic       5.4.0-105.119                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-107-generic       5.4.0-107.121                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-109-generic       5.4.0-109.123                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-110-generic       5.4.0-110.124                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-113-generic       5.4.0-113.127                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-117-generic       5.4.0-117.132                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-120-generic       5.4.0-120.136                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-121-generic       5.4.0-121.137                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-122-generic       5.4.0-122.138                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-131-generic       5.4.0-131.147                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-132-generic       5.4.0-132.148                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-135-generic       5.4.0-135.152                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-73-generic        5.4.0-73.82                             amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-84-generic        5.4.0-84.94                             amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-86-generic        5.4.0-86.97                             amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-88-generic        5.4.0-88.99                             amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-89-generic        5.4.0-89.100                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-90-generic        5.4.0-90.101                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-91-generic        5.4.0-91.102                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-92-generic        5.4.0-92.103                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-94-generic        5.4.0-94.106                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-96-generic        5.4.0-96.109                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-97-generic        5.4.0-97.110                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-99-generic        5.4.0-99.112                            amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.15.0-56-generic 5.15.0-56.62                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.15.0-57-generic 5.15.0-57.63                            amd64        Linux kernel extra modules for version 5.15.0 on 64 bit x86 SMP
rc  ltrace                                0.7.3-6.1ubuntu6                        amd64        Tracks runtime library calls in dynamically linked programs
rc  popularity-contest                    1.71ubuntu3                             all          Vote for your favourite packages automatically
rc  python2.7-minimal                     2.7.18-13ubuntu1.1                      amd64        Minimal subset of the Python language (version 2.7)
rFR python3-apt                           2.4.0ubuntu1                            amd64        Python 3 interface to libapt-pkg
iFR python3-pip                           22.0.2+dfsg-1ubuntu0.1                  all          Python package installer
rc  python3.8-minimal                     3.8.10-0ubuntu1~20.04.6                 amd64        Minimal subset of the Python language (version 3.8)
rc  python3.8-venv                        3.8.10-0ubuntu1~20.04.6                 amd64        Interactive high-level object-oriented language (pyvenv binary, version 3.8)
rc  ubuntu-fan                            0.12.13ubuntu0.1                        all          Ubuntu FAN network support enablement
rc  wmdocker                              1.5-2                                   amd64        System tray for KDE3/GNOME2 docklet applications

Hors ligne

#4 Le 02/03/2023, à 09:54

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Pour purger les résidus de configuration marqués "rc" :

sudo apt purge ~c

comme expliqué à la machine à café et rajouté dans ce message

rFR python3-apt                           2.4.0ubuntu1                            amd64        Python 3 interface to libapt-pkg
iFR python3-pip                           22.0.2+dfsg-1ubuntu0.1                  all          Python package installer

Là, il va falloir des aidants constauds.

Pour l'état des paquets :

Le 14/08/2020, moko138 a écrit :

(...)
La source est tout simplement :

man dpkg-query
              Les trois premières colonnes affichées montrent dans l'ordre : l'action souhaitée,  l'état
              du paquet et les erreurs.

              Action souhaitée :
                u = Inconnu (Unknown)
                i = Installer (Install)
                h = Garder (Hold)
                r = Supprimer (Remove)
                p = Purger (Purge)

              État du paquet :
                n = Non installé (Not-installed)
                c = Fichiers de configuration (Config-files)
                H = Semi-installé (Half-installed)
                U = Décompressé (Unpacked)
                F = Semi-configuré (Half-configured)
                W = Attente de déclenchements (Triggers-awaiting)
                t = Déclenchements en attente (Triggers-pending)
                i = Installé (Installed)

              Drapeaux d'erreur :
                <empty> = (none)
                R = Reinst-required

              Un  état  en  majuscules ou une lettre d'erreur indiquent que le paquet peut provoquer des
              problèmes graves. Veuillez consulter dpkg(1) à propos des états et drapeaux ci-dessus.

Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#5 Le 02/03/2023, à 10:05

Lush

Re : Impossible de procéder à des installations ou des mises à jour

dpkg -l | awk '/^rc/{print $2}' | xargs -r sudo dpkg -P

(Reading database ... 170834 files and directories currently installed.)
Purging configuration files for at (3.2.5-1ubuntu1) ...
Purging configuration files for bsdmainutils (12.1.7+nmu3ubuntu2) ...
Purging configuration files for containerd (1.5.9-0ubuntu1~20.04.5) ...
Purging configuration files for containerd.io (1.6.18-1) ...
Purging configuration files for crda (3.18-1build1) ...
Purging configuration files for docker.io (20.10.12-0ubuntu2~20.04.1) ...

Nuking /var/lib/docker ...
  (if this is wrong, press Ctrl+C NOW!)

+ sleep 10

+ rm -rf /var/lib/docker/buildkit /var/lib/docker/containers /var/lib/docker/engine-id /var/lib/docker/image /var/lib/docker/network /var/lib/docker/nuke-graph-directory.sh /var/lib/docker/overlay2 /var/lib/docker/plugins /var/lib/docker/runtimes /var/lib/docker/swarm /var/lib/docker/tmp /var/lib/docker/trust /var/lib/docker/volumes
dpkg: warning: while removing docker.io, directory '/etc/docker' not empty so not removed
Purging configuration files for fuse (2.9.9-3) ...
Purging configuration files for ippusbxd (1.34-2ubuntu1) ...
Purging configuration files for libpython2.7-minimal:amd64 (2.7.18-13ubuntu1.1) ...
Purging configuration files for libpython3.8-minimal:amd64 (3.8.10-0ubuntu1~20.04.6) ...
Purging configuration files for linux-image-5.15.0-56-generic (5.15.0-56.62) ...
Purging configuration files for linux-image-5.15.0-57-generic (5.15.0-57.63) ...
Purging configuration files for linux-image-5.4.0-100-generic (5.4.0-100.113) ...
Purging configuration files for linux-image-5.4.0-104-generic (5.4.0-104.118) ...
Purging configuration files for linux-image-5.4.0-105-generic (5.4.0-105.119) ...
Purging configuration files for linux-image-5.4.0-107-generic (5.4.0-107.121) ...
Purging configuration files for linux-image-5.4.0-109-generic (5.4.0-109.123) ...
Purging configuration files for linux-image-5.4.0-110-generic (5.4.0-110.124) ...
Purging configuration files for linux-image-5.4.0-113-generic (5.4.0-113.127) ...
Purging configuration files for linux-image-5.4.0-117-generic (5.4.0-117.132) ...
Purging configuration files for linux-image-5.4.0-120-generic (5.4.0-120.136) ...
Purging configuration files for linux-image-5.4.0-121-generic (5.4.0-121.137) ...
Purging configuration files for linux-image-5.4.0-122-generic (5.4.0-122.138) ...
Purging configuration files for linux-image-5.4.0-131-generic (5.4.0-131.147) ...
Purging configuration files for linux-image-5.4.0-132-generic (5.4.0-132.148) ...
Purging configuration files for linux-image-5.4.0-135-generic (5.4.0-135.152) ...
Purging configuration files for linux-image-5.4.0-73-generic (5.4.0-73.82) ...
Purging configuration files for linux-image-5.4.0-84-generic (5.4.0-84.94) ...
Purging configuration files for linux-image-5.4.0-86-generic (5.4.0-86.97) ...
Purging configuration files for linux-image-5.4.0-88-generic (5.4.0-88.99) ...
Purging configuration files for linux-image-5.4.0-89-generic (5.4.0-89.100) ...
Purging configuration files for linux-image-5.4.0-90-generic (5.4.0-90.101) ...
Purging configuration files for linux-image-5.4.0-91-generic (5.4.0-91.102) ...
Purging configuration files for linux-image-5.4.0-92-generic (5.4.0-92.103) ...
Purging configuration files for linux-image-5.4.0-94-generic (5.4.0-94.106) ...
Purging configuration files for linux-image-5.4.0-96-generic (5.4.0-96.109) ...
Purging configuration files for linux-image-5.4.0-97-generic (5.4.0-97.110) ...
Purging configuration files for linux-image-5.4.0-99-generic (5.4.0-99.112) ...
Purging configuration files for linux-modules-5.15.0-56-generic (5.15.0-56.62) ...
Purging configuration files for linux-modules-5.15.0-57-generic (5.15.0-57.63) ...
Purging configuration files for linux-modules-5.4.0-100-generic (5.4.0-100.113) ...
Purging configuration files for linux-modules-5.4.0-104-generic (5.4.0-104.118) ...
Purging configuration files for linux-modules-5.4.0-105-generic (5.4.0-105.119) ...
Purging configuration files for linux-modules-5.4.0-107-generic (5.4.0-107.121) ...
Purging configuration files for linux-modules-5.4.0-109-generic (5.4.0-109.123) ...
Purging configuration files for linux-modules-5.4.0-110-generic (5.4.0-110.124) ...
Purging configuration files for linux-modules-5.4.0-113-generic (5.4.0-113.127) ...
Purging configuration files for linux-modules-5.4.0-117-generic (5.4.0-117.132) ...
Purging configuration files for linux-modules-5.4.0-120-generic (5.4.0-120.136) ...
Purging configuration files for linux-modules-5.4.0-121-generic (5.4.0-121.137) ...
Purging configuration files for linux-modules-5.4.0-122-generic (5.4.0-122.138) ...
Purging configuration files for linux-modules-5.4.0-131-generic (5.4.0-131.147) ...
Purging configuration files for linux-modules-5.4.0-132-generic (5.4.0-132.148) ...
Purging configuration files for linux-modules-5.4.0-135-generic (5.4.0-135.152) ...
Purging configuration files for linux-modules-5.4.0-73-generic (5.4.0-73.82) ...
Purging configuration files for linux-modules-5.4.0-84-generic (5.4.0-84.94) ...
Purging configuration files for linux-modules-5.4.0-86-generic (5.4.0-86.97) ...
Purging configuration files for linux-modules-5.4.0-88-generic (5.4.0-88.99) ...
Purging configuration files for linux-modules-5.4.0-89-generic (5.4.0-89.100) ...
Purging configuration files for linux-modules-5.4.0-90-generic (5.4.0-90.101) ...
Purging configuration files for linux-modules-5.4.0-91-generic (5.4.0-91.102) ...
Purging configuration files for linux-modules-5.4.0-92-generic (5.4.0-92.103) ...
Purging configuration files for linux-modules-5.4.0-94-generic (5.4.0-94.106) ...
Purging configuration files for linux-modules-5.4.0-96-generic (5.4.0-96.109) ...
Purging configuration files for linux-modules-5.4.0-97-generic (5.4.0-97.110) ...
Purging configuration files for linux-modules-5.4.0-99-generic (5.4.0-99.112) ...
Purging configuration files for linux-modules-extra-5.15.0-56-generic (5.15.0-56.62) ...
Purging configuration files for linux-modules-extra-5.15.0-57-generic (5.15.0-57.63) ...
Purging configuration files for ltrace (0.7.3-6.1ubuntu6) ...
Purging configuration files for popularity-contest (1.71ubuntu3) ...
Purging configuration files for python2.7-minimal (2.7.18-13ubuntu1.1) ...
Purging configuration files for python3.8-minimal (3.8.10-0ubuntu1~20.04.6) ...
Purging configuration files for python3.8-venv (3.8.10-0ubuntu1~20.04.6) ...
Purging configuration files for ubuntu-fan (0.12.13ubuntu0.1) ...
Purging configuration files for wmdocker (1.5-2) ...

sudo dpkg -l | grep "^iU"

sudo apt-get -f install       

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

sudo apt-get remove --purge $(dpkg -l | grep "^iU" | awk '{print $2}')

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

sudo dpkg -l | grep "^rc"


sudo apt purge '~c'

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

Dernière modification par Lush (Le 02/03/2023, à 10:05)

Hors ligne

#6 Le 02/03/2023, à 10:12

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Tente pour voir :

sudo apt install --reinstall python3-pip
sudo apt-get update && sudo apt-get install --reinstall python3-apt

> askubuntu.com/questions/1015067/e-the-package-python3-apt-needs-to-be-reinstalled-but-i-cant-find-an-archive

Dernière modification par xubu1957 (Le 02/03/2023, à 10:15)


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#7 Le 02/03/2023, à 10:17

Lush

Re : Impossible de procéder à des installations ou des mises à jour

sudo apt install --reinstall python3-pip

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package python3-apt needs to be reinstalled, but I can't find an archive for it.

sudo apt-get update && sudo apt-get install --reinstall python3-apt

Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:2 http://mirrors.digitalocean.com/ubuntu focal InRelease                                 
Get:3 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease [114 kB]                
Hit:4 https://download.docker.com/linux/ubuntu jammy InRelease                               
Get:5 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease [108 kB]              
Hit:6 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease                
Get:7 http://mirrors.digitalocean.com/ubuntu focal-updates/main amd64 Packages [2386 kB]     
Get:9 http://mirrors.digitalocean.com/ubuntu focal-updates/universe amd64 Packages [1031 kB] 
Hit:8 https://packagecloud.io/AtomEditor/atom/any any InRelease                              
Fetched 3753 kB in 8s (443 kB/s)               
Traceback (most recent call last):
  File "/usr/lib/cnf-update-db", line 3, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists... Done
W: https://packagecloud.io/AtomEditor/atom/any/dists/any/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code

C'est bien ma faute d'avoir eu l'idée de substituer les paquets natifs avec pyenv sad

Hors ligne

#8 Le 02/03/2023, à 10:52

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Si tu vois une piste dans askubuntu.com/questions/1301461/modulenotfounderror-no-module-named-apt-pkg-whilst-running-apt-update

Je ne saurais pas aider plus !  ¯∖_(ツ)_/¯


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#9 Le 02/03/2023, à 10:53

Lush

Re : Impossible de procéder à des installations ou des mises à jour

sudo dpkg --configure -a

dpkg: error processing package python3-pip (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python3-pip

Je me réfère à cette publication

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

dpkg: error processing package python3-pip (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python3-pip

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

dpkg: error processing package python3-pip (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Errors were encountered while processing:
 python3-pip

Je vais donc suivre l'option 2 mentionnée par Raffa, je te tiens informé !

Hors ligne

#10 Le 02/03/2023, à 10:56

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Fournis les noyaux présents :

echo; dpkg -l | awk '!/^rc/ && / linux-(c|g|h|i|lo|m|si|t)/{print $1,$2,$3,$4 | "sort -k3V | column -t"}' ; echo -e "\nNoyau courant : $(uname -mr)"

Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#11 Le 02/03/2023, à 11:33

Lush

Re : Impossible de procéder à des installations ou des mises à jour

echo; dpkg -l | awk '!/^rc/ && / linux-(c|g|h|i|lo|m|si|t)/{print $1,$2,$3,$4 | "sort -k3V | column -t"}' ; echo -e "\nNoyau courant : $(uname -mr)"

ii  linux-headers-5.15.0-58                5.15.0-58.64  all
ii  linux-headers-5.15.0-58-generic        5.15.0-58.64  amd64
ii  linux-image-5.15.0-58-generic          5.15.0-58.64  amd64
ii  linux-modules-5.15.0-58-generic        5.15.0-58.64  amd64
ii  linux-modules-extra-5.15.0-58-generic  5.15.0-58.64  amd64
ii  linux-headers-5.15.0-60                5.15.0-60.66  all
ii  linux-headers-5.15.0-60-generic        5.15.0-60.66  amd64
ii  linux-image-5.15.0-60-generic          5.15.0-60.66  amd64
ii  linux-modules-5.15.0-60-generic        5.15.0-60.66  amd64
ii  linux-modules-extra-5.15.0-60-generic  5.15.0-60.66  amd64
ii  linux-generic                          5.15.0.60.58  amd64
ii  linux-headers-generic                  5.15.0.60.58  amd64
ii  linux-headers-virtual                  5.15.0.60.58  amd64
ii  linux-image-generic                    5.15.0.60.58  amd64
ii  linux-image-virtual                    5.15.0.60.58  amd64

Noyau courant : 5.15.0-60-generic x86_64

Hors ligne

#12 Le 02/03/2023, à 14:52

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Quels retours pour :

ls /usr/bin/python*
apt-cache policy python3.8
apt-cache policy python3.9
apt-cache policy python3.10

?

> how2shout.com/linux/install-python-3-9-or-3-8-on-ubuntu-22-04-lts-jammy-jellyfish

Dernière modification par xubu1957 (Le 02/03/2023, à 14:54)


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne

#13 Le 02/03/2023, à 20:38

Lush

Re : Impossible de procéder à des installations ou des mises à jour

ls /usr/bin/python*
ls: cannot access '/usr/bin/python3-config': No such file or directory
ls: cannot access '/usr/bin/python3.10-config': No such file or directory
/usr/bin/python3

apt-cache policy python3.8
python3.8

apt-cache policy python3.9
python3.9

apt-cache policy python3.10
python3.10

J'ai perdu l'accès à mon serveur via SSH. Je ne peux pas copier les retours commandes, j'espère que les images sont accessibles et visibles de ton côté.

J'utilise actuellement la console de récupération.

Dernière modification par Lush (Le 02/03/2023, à 20:39)

Hors ligne

#14 Le 02/03/2023, à 20:45

Lush

Re : Impossible de procéder à des installations ou des mises à jour

J'ai réussi à me connecter via SSH avec root grâce au paramétrage temporaire de la console de récupération.

Je vais essayer lancer un dpkg-reconfigure sur le network-manager.

Hors ligne

#15 Le 02/03/2023, à 20:47

Lush

Re : Impossible de procéder à des installations ou des mises à jour

sudo dpkg --configure -a && sudo apt update --fix-missing && sudo apt install -f && sudo apt full-upgrade

A fonctionné en root ! Je ne comprends pas mais je suis ravie.
Voici la liste des paquets installés et mis à jour :

The following NEW packages will be installed:
  dbus-user-session distro-info grub-common grub-gfxpayload-lists grub-pc grub-pc-bin
  grub2-common libfreetype6 libnetplan0 libuv1 linux-image-4.15.0-206-generic
  linux-modules-4.15.0-206-generic motd-news-config os-prober python3-netifaces
  python3-pexpect python3-ptyprocess
The following packages will be upgraded:
  accountsservice apparmor apport apt apt-utils avahi-daemon avahi-utils base-files bash
  bcache-tools bind9-host binutils binutils-common binutils-x86-64-linux-gnu bsdutils
  busybox-initramfs busybox-static bzip2 ca-certificates cloud-init cloud-initramfs-copymods
  cloud-initramfs-dyn-netconf command-not-found command-not-found-data console-setup
  console-setup-linux cpio cron cryptsetup cryptsetup-bin curl dbus debconf debconf-i18n
  dirmngr distro-info-data dmeventd dmidecode dmsetup dnsmasq-base dnsutils dpkg e2fsprogs
  ebtables fdisk file friendly-recovery gcc-8-base gettext-base git git-man gnupg gnupg-l10n
  gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gpgv grep gzip
  initramfs-tools initramfs-tools-bin initramfs-tools-core iproute2 iputils-ping
  iputils-tracepath irqbalance isc-dhcp-client isc-dhcp-common keyboard-configuration
  klibc-utils kmod krb5-locales landscape-common language-selector-common
  libaccountsservice0 libaio1 libapparmor1 libapt-inst2.0 libapt-pkg5.0 libasn1-8-heimdal
  libaudit-common libaudit1 libavahi-client3 libavahi-common-data libavahi-common3
  libavahi-core7 libbind9-160 libbinutils libblkid1 libbsd0 libbz2-1.0 libc-ares2 libc-bin
  libc6 libcom-err2 libcryptsetup12 libcurl3-gnutls libcurl4 libdb5.3 libdbus-1-3
  libdevmapper-event1.02.1 libdevmapper1.02.1 libdns-export1100 libdns1100 libdrm-common
  libdrm2 libelf1 libexpat1 libext2fs2 libfdisk1 libfribidi0 libgcc1 libgcrypt20
  libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgssapi-krb5-2 libgssapi3-heimdal
  libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4
  libhx509-5-heimdal libibverbs1 libicu60 libidn11 libidn2-0 libirs160 libisc-export169
  libisc169 libisccc160 libisccfg160 libjson-c3 libk5crypto3 libkeyutils1 libklibc libkmod2
  libkrb5-26-heimdal libkrb5-3 libkrb5support0 libksba8 libldap-2.4-2 libldap-common
  liblvm2app2.2 liblvm2cmd2.02 liblwres160 liblxc-common liblxc1 liblz4-1 liblzma5
  libmagic-mgc libmagic1 libmount1 libmspack0 libnettle6 libnss-systemd libnss3 libntfs-3g88
  libnuma1 libnvpair1linux libp11-kit0 libpam-modules libpam-modules-bin libpam-runtime
  libpam-systemd libpam0g libparted2 libpcap0.8 libpci3 libpcre3 libperl5.26 libplymouth4
  libpng16-16 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libprocps6
  libpython3-stdlib libpython3.6 libpython3.6-minimal libpython3.6-stdlib librados2 librbd1
  libroken18-heimdal libsasl2-2 libsasl2-modules libsasl2-modules-db libseccomp2 libsepol1
  libsmartcols1 libsqlite3-0 libss2 libssl1.0.0 libssl1.1 libstdc++6 libsystemd0 libudev1
  libunistring2 libuuid1 libuutil1linux libwind0-heimdal libx11-6 libx11-data libxau6
  libxcb1 libxml2 libxslt1.1 libzfs2linux libzpool2linux libzstd1 linux-base
  linux-image-virtual locales login lshw lvm2 lxcfs lxd lxd-client man-db mdadm mount
  multiarch-support netplan.io networkd-dispatcher nplan ntfs-3g open-iscsi open-vm-tools
  openssh-client openssh-server openssh-sftp-server openssl overlayroot parted passwd patch
  pciutils perl perl-base perl-modules-5.26 plymouth plymouth-theme-ubuntu-text policykit-1
  pollinate procps psmisc python-apt-common python3 python3-apport python3-apt
  python3-commandnotfound python3-cryptography python3-debconf python3-distro-info
  python3-distupgrade python3-gdbm python3-gi python3-httplib2 python3-jinja2 python3-jwt
  python3-minimal python3-pkg-resources python3-problem-report python3-requests
  python3-software-properties python3-twisted python3-twisted-bin python3-update-manager
  python3-urllib3 python3.6 python3.6-minimal qemu-block-extra qemu-utils rsync rsyslog
  screen snapd software-properties-common sosreport squashfs-tools sudo systemd systemd-sysv
  tar tcpdump tmux tzdata ubuntu-advantage-tools ubuntu-keyring ubuntu-minimal
  ubuntu-release-upgrader-core ubuntu-server ubuntu-standard udev ufw uidmap
  unattended-upgrades unzip update-manager-core update-notifier-common ureadahead util-linux
  uuid-runtime vim vim-common vim-runtime vim-tiny wget xkb-data xxd xz-utils zfsutils-linux
  zlib1g
319 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.

Hors ligne

#16 Le 02/03/2023, à 20:55

xubu1957

Re : Impossible de procéder à des installations ou des mises à jour

Pour python, je ne sais pas aider.

La version 3.10 serait pour la 22.04. Les versions 3.8 ou 3.9 pour la 20.04 focal.

Si une piste te semble possible dans askubuntu.com/questions/1402456/unmet-dependencies-for-python-3-10


Conseils pour les nouveaux demandeurs et pas qu'eux
Important : Pensez à passer vos sujets en [Réso|u] lorsque ceux-ci le sont, au début du titre en cliquant sur Modifier sous le premier message, et un bref récapitulatif de la solution à la fin de celui-ci. Merci.                   Membre de Linux-Azur

Hors ligne