擁抱自由,使用 linux !

在Linux底下真是太幸福了,有好多東西可以玩。想從windows解脫就是現在!

gcc test.c
gcc: error trying to exec ‘cc1′: execvp: No such file or directory

trt:
touch /usr/bin/cpp
apt-get install –reinstall cpp

log:

apt-get install --reinstall cpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
Need to get 35.9kB of archives.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://free.nchc.org.tw karmic/main cpp 4:4.4.1-1ubuntu2 [35.9kB]
Fetched 35.9kB in 10s (3,560B/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database … 23475 files and directories currently installed.)
Preparing to replace cpp 4:4.4.1-1ubuntu2 (using …/cpp_4%3a4.4.1-1ubuntu2_i386.deb) …
Unpacking replacement cpp …
Processing triggers for man-db …
Setting up cpp (4:4.4.1-1ubuntu2) …
update-alternatives: error: alternative path /usr/bin/cpp doesn’t exist.
dpkg: error processing cpp (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
cpp
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@karmic:~# apt-get install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up cpp (4:4.4.1-1ubuntu2) …
update-alternatives: error: alternative path /usr/bin/cpp doesn’t exist.
dpkg: error processing cpp (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
cpp
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@karmic:~# touch /usr/bin/cpp
root@karmic:~# apt-get install –reinstall cpp
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
intltool-debian g++-4.4 po-debconf libstdc++6-4.4-dev groff-base gettext cpp
libcroco3 libtimedate-perl dpkg-dev html2text
Use ‘apt-get autoremove’ to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up cpp (4:4.4.1-1ubuntu2) …


done

Tags:
  1. thomas Said,

    update :
    apt-get –reinstall install cpp-4.4

Add A Comment