Почему там поврежденные пакеты при переустановке, не форматируя исходный корневой каталог?

Я использовал Ubuntu 15.04, но она сокрушила. Я хочу использовать более стабилизированную операционную систему, таким образом, я переустановил Ubuntu 14.04. В то время как я устанавливал Ubuntu 14.04, я отформатировал "/" каталог и использовал оригинал "/домой" каталог без форматирования. Но когда я ввожу

sudo apt-get install python3-pip

Это произошло ошибка:

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.

Таким образом, я просто ввел команды ниже:

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

И я попробовал еще раз, та же ошибка произошла. Таким образом, я попробовал "способность" следующим образом:

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.

Я ввел "Y" для принятия решения, но не было ничего, оказалось, зафиксировал поврежденные пакеты. Как сделать его?


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.
4
задан 21 September 2015 в 17:38

1 ответ

не решенный, посмотрите ниже

  1. Снижение gcc-4.8-base, libgcc-4.8-dev и gcc-4.8, Вам нужна версия 4.8.2-19ubuntu1 а не (вручную?) установленная версия 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. Восстановление

    sudo apt-get install -f
    
  3. Установка python3-pip

    sudo apt-get install python3-pip
    
<час>

решение операции в секунду: переустановите системы

1
ответ дан 1 December 2019 в 10:40

Другие вопросы по тегам:

Похожие вопросы: