[问题]令人费解的gcc编译环境,总是找不到所需头文件
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- kevinfrog
- 帖子: 48
- 注册时间: 2008-05-23 0:59
- 来自: 中国上海
[问题]令人费解的gcc编译环境,总是找不到所需头文件
安装好ubuntu8.04后,第一件事就是配置c/c++编译环境,可是默认不带头文件库,于是按照论坛里的提示安装libc6-dev软件包,可是在新立得中提示:libc6-dev:
依赖: libc6 (=2.7-10ubuntu3) 但是将会安装 2.8~20080505-0ubuntu3
查看了一下我的系统果然已经安装了libc6 (2.8~20080505-0ubuntu3)这个版本,可是人家libc6-dev依赖的是 libc6 (=2.7-10ubuntu3),不认我的libc6 (2.8~20080505-0ubuntu3),于是我就打算卸掉libc6 (2.8~20080505-0ubuntu3)装回 libc6 (=2.7-10ubuntu3),但是直觉告诉我这是很危险的,会让我的ubuntu崩溃,所以我没那样作,到这里来向各位高手请教。
注:
我试过安装G++,还有build-essential都以失败告终,急啊,我要工作阿,不想用IDE,大家帮帮我吧!
依赖: libc6 (=2.7-10ubuntu3) 但是将会安装 2.8~20080505-0ubuntu3
查看了一下我的系统果然已经安装了libc6 (2.8~20080505-0ubuntu3)这个版本,可是人家libc6-dev依赖的是 libc6 (=2.7-10ubuntu3),不认我的libc6 (2.8~20080505-0ubuntu3),于是我就打算卸掉libc6 (2.8~20080505-0ubuntu3)装回 libc6 (=2.7-10ubuntu3),但是直觉告诉我这是很危险的,会让我的ubuntu崩溃,所以我没那样作,到这里来向各位高手请教。
注:
我试过安装G++,还有build-essential都以失败告终,急啊,我要工作阿,不想用IDE,大家帮帮我吧!
-
- 帖子: 3182
- 注册时间: 2006-03-10 15:10
- 来自: xi'an China
- 联系:
1. 请确认你设置的源没问题。不确定的话请访问
http://wiki.ubuntu.org.cn/Source
2.安装基本编译环境,请参考
http://wiki.ubuntu.org.cn/Gcchowto
3.抽空看看下面:
http://wiki.ubuntu.org.cn/Source
2.安装基本编译环境,请参考
http://wiki.ubuntu.org.cn/Gcchowto
3.抽空看看下面:
- 快速配置指南地址 http://wiki.ubuntu.com.cn/Qref (新手必看!!)
- kevinfrog
- 帖子: 48
- 注册时间: 2008-05-23 0:59
- 来自: 中国上海
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
- kevinfrog
- 帖子: 48
- 注册时间: 2008-05-23 0:59
- 来自: 中国上海
root@ubuntu-laptop:/home/ubuntu# cat /etc/issue
Ubuntu 8.04 \n \l
root@ubuntu-laptop:/home/ubuntu# cat /etc/apt/sources.list
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ hardy-proposed main restricted universe multiverse
都是8.04的阿,两个服务器的平均ping分别是7ms和30ms,是最快得了,我该怎么办啊,
难道要我把所有c语言的头文件自己下载下来吗?再自己手动配置静态连接?
Ubuntu 8.04 \n \l
root@ubuntu-laptop:/home/ubuntu# cat /etc/apt/sources.list
deb http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu hardy-proposed main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-updates main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-backports main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.rootguide.org/ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.rootguide.org/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://mirror.rootguide.org/ubuntu/ hardy-proposed main restricted universe multiverse
都是8.04的阿,两个服务器的平均ping分别是7ms和30ms,是最快得了,我该怎么办啊,
难道要我把所有c语言的头文件自己下载下来吗?再自己手动配置静态连接?
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 3182
- 注册时间: 2006-03-10 15:10
- 来自: xi'an China
- 联系:
- kevinfrog
- 帖子: 48
- 注册时间: 2008-05-23 0:59
- 来自: 中国上海
-
- 帖子: 62
- 注册时间: 2007-03-05 16:57
我看我的 8.04
应该楼主这样的问题不会再出现了吧……$ apt-cache show libc6
Package: libc6
Priority: required
Section: base
Installed-Size: 11348
Maintainer: Ubuntu Core developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: amd64
Source: glibc
Version: 2.7-10ubuntu3
Provides: glibc-2.7-1
Depends: libgcc1
Suggests: locales, glibc-doc
Conflicts: libterm-readline-gnu-perl (<< 1.15-2), tzdata (<< 2007k-1)
Filename: pool/main/g/glibc/libc6_2.7-10ubuntu3_amd64.deb
Size: 4754108
MD5sum: fe033464b288284d4031a3de64da4567
SHA1: 402ab2c33aa59af6a4802de6340dd32be2229dce
SHA256: 18dfd2ba99f95bae7778520afa1b4e86deff490aaa04d08da3e1b3100c999f45
Description: GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: minimal
Just an Ubuntu newbie.