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 18/04/2023, à 17:53

iznobe

[ RESOLU ] Mise a Niveau impossible

Bonjour , je me suis dit qu ' il etait temps de passer ma 18.04 en 20.04 tongue

Sauf que :

mar. avril 18 18:49:50 iznobe@iznobe-PC:~$ do-release-upgrade -c
Recherche d'une nouvelle version d'Ubuntu
Nouvelle version « 20.04.6 LTS » disponible.
Lancer « do-release-upgrade » pour mettre à niveau vers celle-ci.
mar. avril 18 18:50:02 iznobe@iznobe-PC:~$ do-release-upgrade
Recherche d'une nouvelle version d'Ubuntu
Prendre :1 Signature de l'outil de mise à niveau [1554 B]                     
Prendre :2 Outil de mise à niveau [1338 kB]                                   
1340 k o réceptionnés en 0s (0  o/s)                                          
authentification de « focal.tar.gz » avec « focal.tar.gz.gpg » 
extraction de 'focal.tar.gz'
[sudo] Mot de passe de iznobe : 

Lecture du cache

Vérification du gestionnaire de paquets

Mise à niveau impossible 

Votre installation de python3 est corrompue. Veuillez corriger le 
lien symbolique « /usr/bin/python3 ». 

mar. avril 18 18:50:23 iznobe@iznobe-PC:~$ ls -la /usr/bin/python3
lrwxrwxrwx 1 root root 25 oct.   9  2022 /usr/bin/python3 -> /etc/alternatives/python3
mar. avril 18 18:50:46 iznobe@iznobe-PC:~$

je ne me rappelle plus exactement ce que j' ai trafiqué , mais il me semble que j' avais crée un environnement specifique pour un logiciel qui necessitait python 3 a l' epoque .

mar. avril 18 18:51:20 iznobe@iznobe-PC:~$ python --version
Python 2.7.17
mar. avril 18 18:57:30 iznobe@iznobe-PC:~$ ls /usr/bin/python*
/usr/bin/python     /usr/bin/python3.6          /usr/bin/python3.8
/usr/bin/python2    /usr/bin/python3.6-config   /usr/bin/python3-config
/usr/bin/python2.7  /usr/bin/python3.6m         /usr/bin/python3m
/usr/bin/python3    /usr/bin/python3.6m-config  /usr/bin/python3m-config
mar. avril 18 18:57:45 iznobe@iznobe-PC:~$ 

j ' ai retrouvé la commande qui m' avais cerainement permis de modifier ( reverse search ) :

mar. avril 18 18:57:45 iznobe@iznobe-PC:~$ sudo update-alternatives --config python3
Il existe 2 choix pour l'alternative python3 (qui fournit /usr/bin/python3).

  Sélection   Chemin              Priorité  État
------------------------------------------------------------
* 0            /usr/bin/python3.6   2         mode automatique
  1            /usr/bin/python3.6   2         mode manuel
  2            /usr/bin/python3.8   1         mode manuel

Appuyez sur <Entrée> pour conserver la valeur par défaut[*] ou choisissez le numéro sélectionné 

Dernière modification par iznobe (Le 18/04/2023, à 20:57)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#2 Le 18/04/2023, à 18:00

xubu1957

Re : [ RESOLU ] Mise a Niveau impossible

Bonjour,

Rien d'utile dans Mise à niveau impossible : lien symbolique cassé Python [résolu] ?

Dernière modification par xubu1957 (Le 18/04/2023, à 18:24)


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

En ligne

#3 Le 18/04/2023, à 18:02

ylag

Re : [ RESOLU ] Mise a Niveau impossible

Bonjour,

À titre d'information, j'ai ceci sur ma vieille 18.04, sur laquelle je n'ai apporté aucune modification à python :

yvan@yvan-maison:~$ ls -la /usr/bin/python3
lrwxrwxrwx 1 root root 9 oct 25  2018 /usr/bin/python3 -> python3.6
yvan@yvan-maison:~$

A+

Dernière modification par ylag (Le 18/04/2023, à 18:03)

Hors ligne

#4 Le 18/04/2023, à 18:08

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

Salut xubu , alors si justement , bien vu wink

mar. avril 18 19:06:10 iznobe@iznobe-PC:~$ cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\d \t \u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\d \t \u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\d \t \u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi 

# ajout manuel pour mon utilisateur d ' un alias pour lancer python3 par defaut :
#alias python='/usr/bin/python2'
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
        source /etc/profile.d/vte.sh
fi
# ajout pour python3.8 virtual environement
PATH="$PATH:/home/$USER/.local/bin"
mar. avril 18 19:06:22 iznobe@iznobe-PC:~$

sauf que je vois pas trop comment modifier les dernieres lignes de ce fichier du coup , car ce n' est pas tout a fait la meme chose que dans le lien que tu donnes .

je vais tenter de simplement les commenter pour voir ce que ca dis .

Dernière modification par iznobe (Le 18/04/2023, à 18:09)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#5 Le 18/04/2023, à 18:23

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

Bon j ' ai commenté , et decommenter la lgine pour python 2.7 dans le .bashrc => pas de changement .

je me suis risqué a faire les commandes proposés dans le lien donné par xubu1957 => pas de changement

j ' ai essayé les 3altternatives pour python  => pas de changement .

j' ai redemarré entre chaque modification , au cas ou ...

Dernière modification par iznobe (Le 18/04/2023, à 18:24)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#6 Le 18/04/2023, à 18:25

xubu1957

Re : [ RESOLU ] Mise a Niveau impossible

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

En ligne

#7 Le 18/04/2023, à 18:39

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

C ' est finalement reparti apres avoir modifié le lien de python3 comme indiqué par@ylag ( que je remercie au passage ) :

cd /usr/bin
sudo rm python
sudo ln -s python2.7 python
sudo rm python3
sudo ln -s python3.6 python3
cd

j ' ai mis l' alternative par defaut pour python 3 :

sudo update-alternatives --config python3

puis choix auto .
remis le .bashrc a l' etat avant les modifiactions de python :

mar. avril 18 19:38:36 iznobe@iznobe-PC:~$ cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
	# We have color support; assume it's compliant with Ecma-48
	# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
	# a case would tend to support setf rather than setaf.)
	color_prompt=yes
    else
	color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\d \t \u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\d \t \u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\d \t \u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi 

# ajout manuel pour mon utilisateur d ' un alias pour lancer python3 par defaut :
alias python='/usr/bin/python2'
#if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
#        source /etc/profile.d/vte.sh
#fi
# ajout pour python3.8 virtual environement
#PATH="$PATH:/home/$USER/.local/bin"
mar. avril 18 19:38:41 iznobe@iznobe-PC:~$

Et la MAN est en train de se faire , merci a vous wink

Dernière modification par iznobe (Le 18/04/2023, à 18:40)


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#8 Le 18/04/2023, à 18:40

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

@xubu :

mar. avril 18 19:38:41 iznobe@iznobe-PC:~$ dpkg -l | grep -v ^ii
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
+++-==========================================-===============================================-============-===============================================================================
rc  libmhash2:amd64                            0.9.9.9-7                                       amd64        Library for cryptographic hashing and message authentication
rc  libreoffice-common                         1:6.0.7-0ubuntu0.18.04.11                       all          office productivity suite -- arch-independent files
rc  libreoffice-core                           1:6.0.7-0ubuntu0.18.04.11                       amd64        office productivity suite -- arch-dependent files
rc  linux-image-4.15.0-188-generic             4.15.0-188.199                                  amd64        Signed kernel image generic
rc  linux-image-4.15.0-189-generic             4.15.0-189.200                                  amd64        Signed kernel image generic
rc  linux-image-5.4.0-107-generic              5.4.0-107.121~18.04.1                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-121-generic              5.4.0-121.137~18.04.1                           amd64        Signed kernel image generic
rc  linux-image-5.4.0-126-generic              5.4.0-126.142~18.04.1                           amd64        Signed kernel image generic
rc  linux-modules-4.15.0-188-generic           4.15.0-188.199                                  amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc  linux-modules-4.15.0-189-generic           4.15.0-189.200                                  amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-107-generic            5.4.0-107.121~18.04.1                           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~18.04.1                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-5.4.0-126-generic            5.4.0-126.142~18.04.1                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-4.15.0-188-generic     4.15.0-188.199                                  amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc  linux-modules-extra-4.15.0-189-generic     4.15.0-189.200                                  amd64        Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.4.0-107-generic      5.4.0-107.121~18.04.1                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.4.0-121-generic      5.4.0-121.137~18.04.1                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  linux-modules-extra-5.4.0-126-generic      5.4.0-126.142~18.04.1                           amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
rc  mate-control-center                        1.20.2-2ubuntu1                                 amd64        utilities to configure the MATE desktop
rc  mate-icon-theme                            1.20.0-1                                        all          MATE Desktop icon theme
rc  mate-menus                                 1.20.0-2                                        amd64        implementation of the freedesktop menu specification for MATE
rc  mate-settings-daemon                       1.20.1-3                                        amd64        daemon handling the MATE session settings
rc  mate-settings-daemon-common                1.20.1-3                                        all          daemon handling the MATE session settings (common files)
rc  postfix                                    3.3.0-1ubuntu0.4                                amd64        High-performance mail transport agent
mar. avril 18 19:40:16 iznobe@iznobe-PC:~$

retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#9 Le 18/04/2023, à 18:44

xubu1957

Re : [ RESOLU ] Mise a Niveau impossible

Pour nettoyer :

Le 11/02/2017, moko138 a écrit :

Pour supprimer tous ces fichiers de configuration devenus sans objets et marqués "rc", et uniquement ces fichiers, exécute :

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

Pour info, les précisions de nany, pour la commande de nettoyage


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

En ligne

#10 Le 18/04/2023, à 18:50

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

je dois attendre la fin de la MAN avant , ca ne passe pas .


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne

#11 Le 18/04/2023, à 18:56

xubu1957

Re : [ RESOLU ] Mise a Niveau impossible

Si tu arrives sur la 20.04, la commande à passer ensuite sera :

sudo apt purge ~c

Dernière modification par xubu1957 (Le 18/04/2023, à 18:57)


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

En ligne

#12 Le 18/04/2023, à 20:56

iznobe

Re : [ RESOLU ] Mise a Niveau impossible

Bon , voilà , c ' est tout bon , sous 20.04 et nettoyage effectué , faut que je modifie pour " tracker " , et que je remette les PPAs .

Merci a vous je passe en resolu wink


retour COMPLET et utilisable de commande
MSI Z490A-pro , i7 10700 , 32 GB RAM .

Hors ligne