Por que existem pacotes quebrados durante a reinstalação sem formatar o diretório inicial original?

4

Eu usei o Ubuntu 15.04, mas ele foi esmagado. Eu quero usar um sistema operacional mais estabilizado, então eu reinstalei o Ubuntu 14.04. Enquanto eu estava instalando o Ubuntu 14.04, eu formatei o diretório "/" e usei o diretório "/ home" original sem formatação. Mas quando eu digito

sudo apt-get install python3-pip

Ocorreu um erro:

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:

The following packages have unmet dependencies:

python3-pip : Depends: python3-setuptools but it is not going to be installed

          Recommends: build-essential but it is not going to be installed

          Recommends: python3-dev (>= 3.2) but it is not going to be installed

E: Unable to correct problems, you have held broken packages.

Então eu digitei os comandos abaixo:

sudo apt-get update
sudo apt-get autoremove
sudo apt-get -f install

E tentei novamente, o mesmo erro ocorreu. Então eu tentei "aptitude" da seguinte forma:

sudo aptitude install python3-pip

The following NEW packages will be installed:   build-essential{a} dpkg-dev{ab} g++{a} g++-4.8{ab}    libalgorithm-diff-perl{a} libalgorithm-diff-xs-perl{a}    libalgorithm-merge-perl{a} libexpat1-dev{ab} libpython3-dev{a}    libpython3.4-dev{ab} libstdc++-4.8-dev{ab} python3-colorama{a}    python3-dev{a} python3-distlib{a} python3-html5lib{a} python3-pip    python3-requests{a} python3-setuptools{ab} python3-urllib3{a}    python3.4-dev{ab}

0 packages upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.9 MB of archives. After unpacking 77.2 MB will be used.

The following packages have unmet dependencies:

libstdc++-4.8-dev : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed.
                     Depends: libgcc-4.8-dev (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed.

libpython3.4-dev : Depends: libpython3.4-stdlib (= 3.4.0-2ubuntu1) but 3.4.0-2ubuntu1.1 is installed.
                    Depends: libpython3.4 (= 3.4.0-2ubuntu1) but 3.4.0-2ubuntu1.1 is installed.

dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5) but 1.17.5ubuntu5.4 is installed.

python3.4-dev : Depends: python3.4 (= 3.4.0-2ubuntu1) but 3.4.0-2ubuntu1.1 is installed.
                 Depends: libpython3.4 (= 3.4.0-2ubuntu1) but 3.4.0-2ubuntu1.1 is installed.

libexpat1-dev : Depends: libexpat1 (= 2.1.0-4ubuntu1) but 2.1.0-4ubuntu1.1 is installed.

g++-4.8 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed.
           Depends: gcc-4.8 (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed.

python3-setuptools : Depends: python3-pkg-resources (= 3.3-1ubuntu1) but 3.3-1ubuntu2 is installed.

The following actions will resolve these dependencies:
     Keep the following packages at their current version:

1)      build-essential [Not Installed]                    
2)      dpkg-dev [Not Installed]                           
3)      g++ [Not Installed]                                
4)      g++-4.8 [Not Installed]                            
5)      libexpat1-dev [Not Installed]                      
6)      libpython3-dev [Not Installed]                     
7)      libpython3.4-dev [Not Installed]                   
8)      libstdc++-4.8-dev [Not Installed]                  
9)      python3-dev [Not Installed]                        
10)     python3-pip [Not Installed]                        
11)     python3-setuptools [Not Installed]                 
12)     python3.4-dev [Not Installed]                      
      Leave the following dependencies unresolved:         
13)     python3-pip recommends build-essential             
14)     python3-pip recommends python3-dev (>= 3.2)        


Accept this solution? [Y/n/q/?] y

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Eu digitei "Y" para aceitar a solução, mas nada aconteceu para consertar os pacotes quebrados. Como fazer isso?

kl@kali:~$ apt-cache policy python3-pip python3-setuptools python3-dev build-essential

python3-pip: 
Installed: (none)
Candidate: 1.5.4-1
Version table:
   1.5.4-1 0
      500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/universe amd64 Packages
python3-setuptools:
Installed: (none)
Candidate: 3.3-1ubuntu1
Version table:
 3.3-1ubuntu1 0
    500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/main amd64 Packages
python3-dev: 
Installed: (none)
Candidate: 3.4.0-0ubuntu2
Version table:
 3.4.0-0ubuntu2 0
    500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/main amd64 Packages
build-essential:
Installed: (none)
Candidate: 11.6ubuntu6
Version table:
   11.6ubuntu6 0
      500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/main amd64 Packages
kl@kali:~$ apt-cache policy libstdc++-4.8-dev gcc-4.8-base
libstdc++-4.8-dev:
 Installed: (none)
Candidate: 4.8.2-19ubuntu1
Version table:
 4.8.2-19ubuntu1 0
    500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/main amd64 Packages
gcc-4.8-base:
  Installed: 4.8.4-2ubuntu1~14.04
  Candidate: 4.8.4-2ubuntu1~14.04
  Version table:
 *** 4.8.4-2ubuntu1~14.04 0
    100 /var/lib/dpkg/status
 4.8.2-19ubuntu1 0
    500 http://ftp.sjtu.edu.cn/ubuntu/ trusty/main amd64 Packages
kl@kali:~$ sudo apt-get install gcc-4.8-base=4.8.2-19ubuntu1 libgcc-4.8-dev=4.8.2-19ubuntu1 gcc-4.8=4.8.2-19ubuntu1
[sudo] password for kl: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
The following packages have unmet dependencies:
 gcc-4.8 : Depends: cpp-4.8 (= 4.8.4-2ubuntu1~14.04) but it is not going to be installed
       Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is to be installed
        Depends: libgcc-4.8-dev (>= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is to be installed
 libgcc-4.8-dev : Depends: libgomp1 (>= 4.8.2-19ubuntu1) but it is not going to be installed
              Depends: libitm1 (>= 4.8.2-19ubuntu1) but it is not going to be installed
              Depends: libatomic1 (>= 4.8.2-19ubuntu1) but it is not going to be installed
              Depends: libasan0 (>= 4.8.2-19ubuntu1) but it is not going to be installed
              Depends: libtsan0 (>= 4.8.2-19ubuntu1) but it is not going to be installed
              Depends: libquadmath0 (>= 4.8.2-19ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
    
por socket 21.09.2015 / 11:06

1 resposta

1

não resolvido, veja abaixo

  1. Downgrade gcc-4.8-base , libgcc-4.8-dev e gcc-4.8 , você precisa da versão 4.8.2-19ubuntu1 e não da versão (manualmente?) instalada 4.8.4-2ubuntu1~14.04

    sudo apt-get install gcc-4.8-base=4.8.2-19ubuntu1 libgcc-4.8-dev=4.8.2-19ubuntu1 gcc-4.8=4.8.2-19ubuntu1
    
  2. Reparo

    sudo apt-get install -f
    
  3. Instale python3-pip

    sudo apt-get install python3-pip
    

decisão do OP: reinstalação do sistema

    
por A.B. 21.09.2015 / 16:11

Tags