случайно удаленный cpp и некоторое важное программное обеспечение

Я пытался установить последнюю версию gcc (gcc-7).When, я выполняю команду

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7

Я сделал этот:-

$ sudo update-alternatives --install "/usr/bin/cpp" "cpp" "/usr/bin/cpp-7" 1
update-alternatives: renaming cpp link from /lib/cpp to /usr/bin/cpp
$ sudo update-alternatives --config cppupdate-alternatives: error: cannot stat file '/usr/bin/cpp': Too many levels of symbolic links

Так я revmoev cpp

$ sudo apt remove cpp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  g++-5 libstdc++-5-dev
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  build-essential cpp g++ gcc libidl-2-0 liborbit2 libtool python-pyorbit
  virtualbox-guest-x11 x11-session-utils x11-xserver-utils xorg
0 upgraded, 0 newly installed, 12 to remove and 0 not upgraded.
After this operation, 8,760 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 463218 files and directories currently installed.)
Removing build-essential (12.1ubuntu2) ...
Removing virtualbox-guest-x11 (5.0.40-dfsg-0ubuntu1.16.04.2) ...
Removing xorg (1:7.7+13ubuntu3) ...
Removing x11-xserver-utils (7.7+7) ...
Removing python-pyorbit (2.24.0-7.1) ...
Removing liborbit2:amd64 (1:2.14.19-1build1) ...
Removing libidl-2-0:amd64 (0.8.14-4) ...
Removing x11-session-utils (7.7+2) ...
Removing g++ (4:5.3.1-1ubuntu1) ...
Removing libtool (2.4.6-0.1) ...
Removing gcc (4:5.3.1-1ubuntu1) ...
Removing cpp (4:5.3.1-1ubuntu1) ...
update-alternatives: error: cannot stat file '/usr/bin/cpp': Too many levels of symbolic links
dpkg: error processing package cpp (--remove):
 subprocess installed pre-removal script returned error exit status 2
update-alternatives: error: cannot stat file '/usr/bin/cpp': Too many levels of symbolic links
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 cpp
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я знаю, что это - безумная вещь продолжиться, но я нажал y по ошибке. Теперь я не могу установить их назад!!

$ sudo apt install build-essential cpp g++ gcc libidl-2-0 liborbit2 libtool python-pyorbit
[sudo] password for smit: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cpp is already the newest version (4:5.3.1-1ubuntu1).
Suggested packages:
  g++-multilib gcc-multilib gcc-doc libtool-doc gfortran | fortran95-compiler
  gcj-jdk
Recommended packages:
  libltdl-dev
The following NEW packages will be installed:
  build-essential g++ gcc libidl-2-0 liborbit2 libtool python-pyorbit
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 335 kB/346 kB of archives.
After this operation, 1,522 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libidl-2-0 amd64 0.8.14-4 [68.9 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 liborbit2 amd64 1:2.14.19-1build1 [14.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python-pyorbit amd64 2.24.0-7.1 [57.8 kB]
Fetched 335 kB in 3s (109 kB/s)          
Selecting previously unselected package gcc.
(Reading database ... 463092 files and directories currently installed.)
Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking gcc (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking g++ (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Selecting previously unselected package libidl-2-0:amd64.
Preparing to unpack .../libidl-2-0_0.8.14-4_amd64.deb ...
Unpacking libidl-2-0:amd64 (0.8.14-4) ...
Selecting previously unselected package liborbit2:amd64.
Preparing to unpack .../liborbit2_1%3a2.14.19-1build1_amd64.deb ...
Unpacking liborbit2:amd64 (1:2.14.19-1build1) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-0.1_all.deb ...
Unpacking libtool (2.4.6-0.1) ...
Selecting previously unselected package python-pyorbit.
Preparing to unpack .../python-pyorbit_2.24.0-7.1_amd64.deb ...
Unpacking python-pyorbit (2.24.0-7.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up cpp (4:5.3.1-1ubuntu1) ...
update-alternatives: error: cannot stat file '/usr/bin/cpp': Too many levels of symbolic links
dpkg: error processing package cpp (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of x11-session-utils:
 x11-session-utils depends on cpp; however:
  Package cpp is not configured yet.

dpkg: error processing package x11-session-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of x11-xserver-utils:
 x11-xserver-utils depends on cpp; however:
  Package cpp is not configured yet.

dpkg: error processing package x11-xserver-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xorg:
 xorg depends on x11-session-utils; however:
  Package x11-session-utils is not configured yet.
 xorg depends on x11-xserver-utils; however:
  Package x11-xserver-utils is not configured yet.

dpkg: error processing package xorg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gcc:
 gcc depends on cpp (>= 4:5.3.1-1ubuntu1); however:
  Package cpp is not configured yet.

dpkg: error processing package gcc (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of g++:
 g++ depends on cpp (>= 4:5.3.1-1ubuntu1); however:
  Package cpp is not configured yet.
 g++ depends on gcc (>= 4:5.3.1-1ubuntu1); however:
  Package gcc is not configured yet.

dpkg: error processing package g++ (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of build-essential:
 build-essential depends on gcc (>= 4:5.2); however:
  Package gcc is not configured yet.
 build-essential depends on g++ (>= 4:5.2); however:
  Package g++ is not configured yet.

dpkg: error processing package build-essential (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libidl-2-0:amd64:
 libidl-2-0:amd64 depends on cpp:any; however:
  Package cpp is not configured yet.

dpkg: error processing package libidl-2-0:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of liborbit2:amd64:
 liborbit2:amd64 depends on libidl-2-0 (>= 0.8.14); however:
  Package libidl-2-0:amd64 is not configured yet.

dpkg: error processing package liborbit2:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libtool:
 libtool depends on cpp; however:
  Package cpp is not configured yet.

dpkg: error processing package libtool (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-pyorbit:
 python-pyorbit depends on liborbit2 (>= 1:2.14.10); however:
  Package liborbit2:amd64 is not configured yet.

dpkg: error processing package python-pyorbit (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 cpp
 x11-session-utils
 x11-xserver-utils
 xorg
 gcc
 g++
 build-essential
 libidl-2-0:amd64
 liborbit2:amd64
 libtool
 python-pyorbit
E: Sub-process /usr/bin/dpkg returned an error code (1)

я нуждаюсь в помощи!

1
задан 15 December 2017 в 09:16

1 ответ

Я скачал cpp с https://packages.ubuntu.com/xenial/amd64/cpp/download и установил его с помощью: -

sudo dpkg -i cpp_5.3.1-1ubuntu1_amd64.deb

, а затем установил оставшиеся пакеты, которые решают проблему

0
ответ дан 15 December 2017 в 09:16

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

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