我在安装没有互联网连接的 Kubuntu 12.04 时遇到了困难。为了构建以太网驱动程序,我需要gcc
。我从 DVD 安装了,并且已经gcc-4.7-base
安装了但没有提供gcc
可执行文件?我应该只创建一个符号链接吗?否则我应该如何安装gcc
?
谢谢。
编辑:以下是安装 GCC 的一些尝试。CD-ROM 存储库已在 中启用/etc/apt/sources.list
,并且完整的 DVD 已放入驱动器中。
shelly@neptune:~$ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
gcc-4.6 libc-dev-bin libc6-dev libgomp1 libquadmath0 linux-libc-dev manpages-dev
Suggested packages:
gcc-multilib autoconf automake1.9 libtool flex bison gcc-doc gcc-4.6-multilib libmudflap0-4.6-dev gcc-4.6-doc gcc-4.6-locales libgcc1-dbg libgomp1-dbg libquadmath0-dbg libmudflap0-dbg binutils-gold glibc-doc
The following NEW packages will be installed:
gcc gcc-4.6 libc-dev-bin libc6-dev libgomp1 libquadmath0 linux-libc-dev manpages-dev
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/13.2 MB of archives.
After this operation, 33.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libquadmath0 amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main gcc-4.6 amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main gcc amd64 4:4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libc-dev-bin amd64 2.15-0ubuntu10
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main linux-libc-dev amd64 3.2.0-23.36
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libc6-dev amd64 2.15-0ubuntu10
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main manpages-dev all 3.35-0.1ubuntu1
File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/libquadmath0_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/gcc-4.6_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-defaults/gcc_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/e/eglibc/libc-dev-bin_2.15-0ubuntu10_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/l/linux/linux-libc-dev_3.2.0-23.36_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/e/eglibc/libc6-dev_2.15-0ubuntu10_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/m/manpages/manpages-dev_3.35-0.1ubuntu1_all.deb File not found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
shelly@neptune:~$
shelly@neptune:~$
shelly@neptune:~$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libgomp1 libquadmath0 libstdc++6-4.6-dev linux-libc-dev manpages-dev patch
Suggested packages:
debian-keyring g++-multilib g++-4.6-multilib gcc-4.6-doc libstdc++6-4.6-dbg gcc-multilib autoconf automake1.9 libtool flex bison gcc-doc gcc-4.6-multilib libmudflap0-4.6-dev gcc-4.6-locales libgcc1-dbg libgomp1-dbg libquadmath0-dbg
libmudflap0-dbg binutils-gold glibc-doc libstdc++6-4.6-doc diffutils-doc
The following NEW packages will be installed:
build-essential dpkg-dev fakeroot g++ g++-4.6 gcc gcc-4.6 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libgomp1 libquadmath0 libstdc++6-4.6-dev linux-libc-dev
manpages-dev patch
0 upgraded, 19 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/22.8 MB of archives.
After this operation, 62.2 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libquadmath0 amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libc-dev-bin amd64 2.15-0ubuntu10
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main linux-libc-dev amd64 3.2.0-23.36
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libc6-dev amd64 2.15-0ubuntu10
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main gcc-4.6 amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main gcc amd64 4:4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libstdc++6-4.6-dev amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main g++-4.6 amd64 4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main g++ amd64 4:4.6.3-1ubuntu5
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libdpkg-perl all 1.16.1.2ubuntu7
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main patch amd64 2.6.1-3
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main dpkg-dev all 1.16.1.2ubuntu7
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main build-essential amd64 11.5ubuntu2
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main fakeroot amd64 1.18.2-1
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libalgorithm-diff-perl all 1.19.02-2
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libalgorithm-diff-xs-perl amd64 0.04-2build2
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main libalgorithm-merge-perl all 0.08-2
File not found
Err cdrom://Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)/ precise/main manpages-dev all 3.35-0.1ubuntu1
File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/libquadmath0_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/e/eglibc/libc-dev-bin_2.15-0ubuntu10_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/l/linux/linux-libc-dev_3.2.0-23.36_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/e/eglibc/libc6-dev_2.15-0ubuntu10_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/gcc-4.6_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-defaults/gcc_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/libstdc++6-4.6-dev_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-4.6/g++-4.6_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/g/gcc-defaults/g++_4.6.3-1ubuntu5_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/d/dpkg/libdpkg-perl_1.16.1.2ubuntu7_all.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/p/patch/patch_2.6.1-3_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/d/dpkg/dpkg-dev_1.16.1.2ubuntu7_all.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/b/build-essential/build-essential_11.5ubuntu2_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/f/fakeroot/fakeroot_1.18.2-1_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/liba/libalgorithm-diff-perl/libalgorithm-diff-perl_1.19.02-2_all.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/liba/libalgorithm-diff-xs-perl/libalgorithm-diff-xs-perl_0.04-2build2_amd64.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/liba/libalgorithm-merge-perl/libalgorithm-merge-perl_0.08-2_all.deb File not found
Failed to fetch cdrom:[Kubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120423)]/pool/main/m/manpages/manpages-dev_3.35-0.1ubuntu1_all.deb File not found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
shelly@neptune:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 15570572 2675916 12113448 19% /
udev 829680 4 829676 1% /dev
tmpfs 336752 816 335936 1% /run
none 5120 0 5120 0% /run/lock
none 841872 80 841792 1% /run/shm
/dev/sda6 454024280 6869848 424428648 2% /home
/dev/sr0 3401516 3401516 0 100% /media/apt
shelly@neptune:~$ ls /media/
apt/ .directory .hidden
shelly@neptune:~$ ls /media/apt/
autorun.inf boot casper cdromupgrade dists doc efi install isolinux md5sum.txt pics pool preseed README.diskdefines ubuntu wubi.exe
答案1
gcc-4.7-base
仅包含 gcc 中所有语言和库的通用文件。它不包含gcc
编译器本身。如果您想gcc
从 CD 安装,请插入它并发出命令sudo apt-get install build-essential
,它会为您提供gcc
和g++
(C++ 编译器)。