#26 Le 25/07/2021, à 21:48
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Je vois que tu cites Kubuntu, pour info je suis bien sur Xubuntu 18.04.
Voici les retours des 3 commandes:
update-alternatives: erreur: pas d'alternatives pour python
Python 2.7.17
lrwxrwxrwx 1 root root 9 avril 16 2018 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 avril 16 2018 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3633000 févr. 27 16:10 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 oct. 25 2018 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 4526456 janv. 26 16:33 /usr/bin/python3.6
-rwxr-xr-x 2 root root 4526456 janv. 26 16:33 /usr/bin/python3.6m
lrwxrwxrwx 1 root root 10 oct. 25 2018 /usr/bin/python3m -> python3.6m
Hors ligne
#27 Le 25/07/2021, à 21:53
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Oui, mais j'avais pas de machine virtuelle avec xubuntu 18.04 ni son iso sous la main, mais j'ai pu quand même faire la comparaison globalement.
Ok, j'ai compris l'erreur: là apt utilise python2 au lieu de python3, ce n'est pas un problème de package.
On tente la réparation en passant à python3, tu peux donner
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 20
ls -l /usr/bin/python
Pense bête: https://linuxconfig.org/how-to-change-d … etch-linux
Dernière modification par Nuliel (Le 25/07/2021, à 21:56)
Hors ligne
#28 Le 25/07/2021, à 21:56
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
voici
update-alternatives: la priorité doit être un entier
Utilisez « update-alternatives --help » pour obtenir des informations sur l'utilisation du programme.
update-alternatives: erreur: le chemin alternatif /usr/bin/python3.5 n'existe pas
lrwxrwxrwx 1 root root 9 avril 16 2018 /usr/bin/python -> python2.7
Hors ligne
#29 Le 25/07/2021, à 21:57
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Désolé, j'avais fait une erreur, tu peux repasser
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 20
ls -l /usr/bin/python
Hors ligne
#30 Le 25/07/2021, à 21:58
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
update-alternatives: utilisation de « /usr/bin/python3.6 » pour fournir « /usr/bin/python » (python) en mode automatique
lrwxrwxrwx 1 root root 24 juil. 25 22:57 /usr/bin/python -> /etc/alternatives/python
Hors ligne
#31 Le 25/07/2021, à 22:03
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Parfait, c'est l'heure de tester
sudo apt-get update
Hors ligne
#32 Le 25/07/2021, à 22:05
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Je sais pas comment tu t'y retrouves je comprends rien à ce que je fais
Atteint :1 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Réception de :2 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Réception de :3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Réception de :4 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Réception de :5 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Réception de :6 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [287 kB]
Réception de :7 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [51,4 kB]
Réception de :8 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [57,9 kB]
Réception de :9 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2468 B]
Réception de :10 http://fr.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9268 B]
Réception de :11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2464 B]
957 ko réceptionnés en 2s (433 ko/s)
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.6/urllib/request.py", line 88, in <module>
import http.client
ModuleNotFoundError: No module named 'http'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Lecture des listes de paquets... Fait
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
Hors ligne
#33 Le 25/07/2021, à 22:11
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
En gros je t'ai demandé d'utiliser update-alternative pour changer plus ou moins proprement /usr/bin/python (c'est un lien qui pointe vers une version de python, actuellement ça pointe vers python 3.6 normalement)
Dans le doute tu peux redonner
python --version
normalement là tu devrais avoir la 3.6
Hors ligne
#34 Le 25/07/2021, à 22:18
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Yes
Python 3.6.9
Hors ligne
#35 Le 25/07/2021, à 22:20
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Ok, je vais y aller, je continuerai demain en soirée probablement.
Je pense qu'on pourra essayer de réinstaller deux trois paquets relatifs à python3 via wget et dpkg, notamment python3-simplejson.
Dernière modification par Nuliel (Le 25/07/2021, à 22:20)
Hors ligne
#36 Le 25/07/2021, à 22:22
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Un grand merci.
Hors ligne
#37 Le 26/07/2021, à 17:22
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Re,
Dans le doute, vérifie que
sudo apt update
a toujours l'erreur "No module named json". S'il n'y a aucune erreur, alors c'est très cool, sinon on va réinstaller python3-simplejson
wget http://fr.archive.ubuntu.com/ubuntu/pool/main/s/simplejson/python3-simplejson_3.13.2-1_amd64.deb
sudo dpkg -i python3-simplejson_3.13.2-1_amd64.deb
puis tu redonnes
sudo apt update
pour voir si l'erreur est toujours là.
Dernière modification par Nuliel (Le 26/07/2021, à 17:22)
Hors ligne
#38 Le 26/07/2021, à 23:14
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Bonjour Nuliel, désolé je ne suis pas trop dispo donc pas trop réactif.
Voici les retours:
Dans un premier temps, il y a toujours l'erreur
Atteint :1 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Réception de :2 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease [88,7 kB]
Réception de :3 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Réception de :4 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB]
Réception de :5 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1323 kB]
Réception de :6 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [51,4 kB]
Réception de :7 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [57,8 kB]
Réception de :8 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2464 B]
Réception de :9 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2160 kB]
Réception de :10 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [294 kB]
Réception de :11 http://fr.archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [413 kB]
Réception de :12 http://fr.archive.ubuntu.com/ubuntu bionic-updates/restricted i386 Packages [27,2 kB]
Réception de :13 http://fr.archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [56,0 kB]
Réception de :14 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1743 kB]
Réception de :15 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [1571 kB]
Réception de :16 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [373 kB]
Réception de :17 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [287 kB]
Réception de :18 http://fr.archive.ubuntu.com/ubuntu bionic-updates/universe DEP-11 64x64 Icons [496 kB]
Réception de :19 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [26,6 kB]
Réception de :20 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [11,6 kB]
Réception de :21 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [6792 B]
Réception de :22 http://fr.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2468 B]
Réception de :23 http://fr.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [9272 B]
9165 ko réceptionnés en 23s (405 ko/s)
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.6/urllib/request.py", line 88, in <module>
import http.client
ModuleNotFoundError: No module named 'http'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Lecture des listes de paquets... Fait
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
Puis réinstall de python3
--2021-07-27 00:08:21-- http://fr.archive.ubuntu.com/ubuntu/pool/main/s/simplejson/python3-simplejson_3.13.2-1_amd64.deb
Résolution de fr.archive.ubuntu.com (fr.archive.ubuntu.com)… 2001:860:f70a::2, 194.158.119.186
Connexion à fr.archive.ubuntu.com (fr.archive.ubuntu.com)|2001:860:f70a::2|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : 49616 (48K) [application/x-debian-package]
Enregistre : «python3-simplejson_3.13.2-1_amd64.deb»
python3-simplejson_ 100%[===================>] 48,45K --.-KB/s ds 0,1s
2021-07-27 00:08:21 (357 KB/s) - «python3-simplejson_3.13.2-1_amd64.deb» enregistré [49616/49616]
et
(Lecture de la base de données... 212917 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de python3-simplejson_3.13.2-1_amd64.deb ...
Dépaquetage de python3-simplejson (3.13.2-1) sur (3.13.2-1) ...
Paramétrage de python3-simplejson (3.13.2-1) ...
Mais a priori ça ne fonctionne pas, résultat de update
(Lecture de la base de données... 212917 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de python3-simplejson_3.13.2-1_amd64.deb ...
Dépaquetage de python3-simplejson (3.13.2-1) sur (3.13.2-1) ...
Paramétrage de python3-simplejson (3.13.2-1) ...
gizmo@big-gizmo:~$
gizmo@big-gizmo:~$ sudo apt update
Atteint :1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Atteint :2 http://fr.archive.ubuntu.com/ubuntu bionic InRelease
Atteint :3 http://fr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Atteint :4 http://fr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 21, in <module>
from urllib.request import urlopen
File "/usr/lib/python3.6/urllib/request.py", line 88, in <module>
import http.client
ModuleNotFoundError: No module named 'http'
Original exception was:
Traceback (most recent call last):
File "/usr/lib/cnf-update-db", line 8, in <module>
from CommandNotFound.db.creator import DbCreator
File "/usr/lib/python3/dist-packages/CommandNotFound/db/creator.py", line 4, in <module>
import json
ModuleNotFoundError: No module named 'json'
Lecture des listes de paquets... Fait
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
Et pour complément j'ai été obligé de faire un fsck pour pouvoir démarrer ce matin.
Dernière modification par Gizmolle (Le 27/07/2021, à 07:26)
Hors ligne
#39 Le 27/07/2021, à 16:15
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Hum, je pense pas que je réussirai à sauver l'install, le package est bien installé, python semble fonctionner, il y a quelque chose entre deux qui pose problème, mais je ne saurais pas l'identifier. Le fsck me pose question par contre, peux tu démarrer sur ton live usb, faire
sudo apt update
sudo apt-get install --no-install-recommends smartmontools
et donner
sudo smartctl -a /dev/sda
cela permettra de vérifier que le disque est encore bon
Hors ligne
#40 Le 27/07/2021, à 18:13
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Voici le retour suite à ton protocole:
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.8.0-43-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: LITEON IT LMT-256L9M
Serial Number: 002436103405
Firmware Version: HM81201
User Capacity: 256060514304 bytes [256 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ATA8-ACS, ATA/ATAPI-7 T13/1532D revision 4a
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Jul 27 17:08:53 2021 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 10) seconds.
Offline data collection
capabilities: (0x15) SMART execute Offline immediate.
No Auto Offline data collection support.
Abort Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
No Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 10) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 000 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0003 100 100 000 Pre-fail Always - 0
9 Power_On_Hours 0x0002 100 100 000 Old_age Always - 9097
12 Power_Cycle_Count 0x0003 100 100 000 Pre-fail Always - 4157
177 Wear_Leveling_Count 0x0003 100 100 000 Pre-fail Always - 111852
178 Used_Rsvd_Blk_Cnt_Chip 0x0003 100 100 000 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0003 100 100 000 Pre-fail Always - 0
182 Erase_Fail_Count_Total 0x0003 100 100 000 Pre-fail Always - 0
187 Reported_Uncorrect 0x0003 100 100 000 Pre-fail Always - 0
188 Command_Timeout 0x0003 100 100 000 Pre-fail Always - 109
189 Unknown_SSD_Attribute 0x0003 100 100 000 Pre-fail Always - 210
191 Unknown_SSD_Attribute 0x0003 100 100 000 Pre-fail Always - 0
192 Power-Off_Retract_Count 0x0003 100 100 000 Pre-fail Always - 228
196 Reallocated_Event_Count 0x0003 100 100 000 Pre-fail Always - 0
198 Offline_Uncorrectable 0x0003 100 100 000 Pre-fail Always - 0
199 UDMA_CRC_Error_Count 0x0003 100 100 000 Pre-fail Always - 0
232 Available_Reservd_Space 0x0003 100 100 010 Pre-fail Always - 0
241 Total_LBAs_Written 0x0003 100 100 000 Pre-fail Always - 388348
242 Total_LBAs_Read 0x0003 100 100 000 Pre-fail Always - 455400
SMART Error Log Version: 0
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 0 -
Selective Self-tests/Logging not supported
Hors ligne
#41 Le 27/07/2021, à 19:48
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Je ne sais pas trop quoi penser de ce résultat, je dirais bien que le ssd semble ok avec le peu de valeurs données, mais il y a des valeurs qui pour moi ont plus un sens sur un disque dur que sur un ssd, d'autres pour lesquelles ont ne sait pas trop à quoi elles correspondent (Unknown_SSD_Attribute), la valeur de Wear_Leveling_Count n'est pas calculé de la même manière chez tous les fabriquants (et si cette valeur correspondait vraiment au nombre d'écriture/écrasement par bloc, ton ssd serait déjà mort depuis longtemps). Command_Timeout et Power-Off_Retract_Count pourrait faire penser à un problème d'alimentation du ssd ou un pb au niveau du câble mais les valeurs ne sont pas assez élevées pour cela à mon avis. Il pourrait être intéressant de faire à l'avenir d'autres rapports smart à comparer avec celui ci pour voir l'évolution.
Donc je pense que tu peux réinstaller, et dans tous les cas pense à faire des sauvegardes régulières.
Hors ligne
#42 Le 27/07/2021, à 19:55
- Gizmolle
Re : Soucis divers et MIse à jour impossible [RESOLU]
Bon ben la solution ne me ravit pas, mais je te remercie vraiment pour le temps et les conseils passés.
Je me lance dans la copie et la réinstall.
++
Hors ligne
#43 Le 27/07/2021, à 19:59
- Nuliel
Re : Soucis divers et MIse à jour impossible [RESOLU]
Malheureusement, quand on commence à devoir faire un fsck, de la donnée est perdu et on sait pas exactement ce qui est perdu (ça peut être un fichier inutile, comme un fichier de configuration nécessaire), donc vaut mieux assurer d'avoir un système pas bancal et de réinstaller, même si c'est pas le plus rapide.
Hors ligne