最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

how to install build-essential

工作和技术 crifan 1185浏览 0评论

*******************************************************************************************************************
after untar the file : build-essential_11.3.tar.gz
then enter directory build-essential-11.3
then do :
————————————————————————————————–
crifan@crifan-desktop:~/download/build-essential-11.3$ sudo ./configure
Password:
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
checking whether to enable maintainer-specific portions of Makefiles… no
checking for dpkg-architecture… yes
checking for Debian architecture… i386
configure: creating ./config.status
config.status: creating Makefile
crifan@crifan-desktop:~/download/build-essential-11.3$ sudo make
make: Nothing to be done for `all’.
crifan@crifan-desktop:~/download/build-essential-11.3$ sudo make install
make[1]: Entering directory `/home/crifan/download/build-essential-11.3′
make[1]: Nothing to be done for `install-exec-am’.
test -z "/usr/local/share/build-essential" || mkdir -p — "/usr/local/share/build-essential"
/usr/bin/install -c -m 644 ‘list’ ‘/usr/local/share/build-essential/list’
/usr/bin/install -c -m 644 ‘essential-packages-list’ ‘/usr/local/share/build-essential/essential-packages-list’
make[1]: Leaving directory `/home/crifan/download/build-essential-11.3′
crifan@crifan-desktop:~/download/build-essential-11.3$
————————————————————————————————–
it seem like we have successfully installed the build-essential.

*******************************************************************************************************************
when input:
sudo apt-get install build-essential
we got:

Reading package lists… Done
Building dependency tree      
Reading state information… Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package build-essential has no installation candidate
*******************************************************************************************************************

crifan@crifan-desktop:~$ sudo gedit /etc/apt/sources.list
crifan@crifan-desktop:~$ sudo apt-get update
Get:1 http://ubuntu.cn99.com feisty Release.gpg [191B]
Ign http://ubuntu.cn99.com feisty/main Translation-en_US
Ign http://ubuntu.cn99.com feisty/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty/multiverse Translation-en_US
Get:2 http://ubuntu.cn99.com feisty-security Release.gpg [191B]
Ign http://ubuntu.cn99.com feisty-security/main Translation-en_US
Ign http://ubuntu.cn99.com feisty-security/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty-security/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty-security/multiverse Translation-en_US
Get:3 http://ubuntu.cn99.com feisty-updates Release.gpg [191B]
Ign http://ubuntu.cn99.com feisty-updates/main Translation-en_US
Ign http://ubuntu.cn99.com feisty-updates/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty-updates/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty-updates/multiverse Translation-en_US
Get:4 http://ubuntu.cn99.com feisty-proposed Release.gpg [191B]
Ign http://ubuntu.cn99.com feisty-proposed/main Translation-en_US
Ign http://ubuntu.cn99.com feisty-proposed/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty-proposed/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty-proposed/multiverse Translation-en_US
Get:5 http://ubuntu.cn99.com feisty-backports Release.gpg [191B]
Ign http://ubuntu.cn99.com feisty-backports/main Translation-en_US
Ign http://ubuntu.cn99.com feisty-backports/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty-backports/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty-backports/multiverse Translation-en_US
Ign http://ubuntu.cn99.com feisty Release.gpg
Ign http://ubuntu.cn99.com feisty/main Translation-en_US
Ign http://ubuntu.cn99.com feisty/restricted Translation-en_US
Ign http://ubuntu.cn99.com feisty/universe Translation-en_US
Ign http://ubuntu.cn99.com feisty/multiverse Translation-en_US
99% [Waiting for headers]                                  

then it stop on 99% ,not going on.
the mostly reason is the speed is very slow.
After my other sevearl times to do it ,It finally continued to download.
*******************************************************************************************************************

when input:
sudo apt-get install build-essential
If you see 0% [Waiting for headers] ,or something like this:
*******************************************************************************************************************
0% [Connecting to mirror.lupaworld.com (211.155.231.159)]
*******************************************************************************************************************
you may encount the problem as me.
the reason is you should to check the proxy and to setup your http proxy correctly !
you can do like this:
*******************************************************************************************************************
edit the /etc/bash.bashrc like this :
input :
sudo gedit /etc/bash.bashrc

add the following at the end of /etc/bash.bashrc:
export http_proxy=http://*.*.*.*:yourport

than save and close.Don’t forget to restart your system to make it take effect !!!
this method should take effect in your whole system.

then edit the sources.list,add the newest source ,such as cn99,then
save.
that is:
sudo gedit /etc/apt/sources.list

and my sources.list context is :
*******************************************************************************************************************
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ feisty main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://cn.archive.ubuntu.com/ubuntu/ feisty universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ feisty multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty multiverse

## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cn.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu feisty-security main restricted
deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse

#Ubuntu.cn99.com 更新服务器(江苏省常州市电信,推荐电信用户使用。):

deb http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ edgy main restricted universe multiverse

#Mirror.lupaworld.com 更新服务器(浙江省杭州市电信,亚洲地区官方更新服务器,推荐全国用户使用。):

#deb http://cn.archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
#deb http://cn.archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu edgy main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu edgy-security main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu edgy-updates main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
#deb-src http://cn.archive.ubuntu.com/ubuntu edgy-proposed main restricted universe multiverse
#deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn edgy main restricted universe multiverse

#Archive.ubuntu.com 更新服务器(欧洲,此为官方源,推荐使用。):
deb http://archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ edgy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://archive.ubuntu.org.cn/ubuntu-cn/ edgy main restricted universe multiverse
*******************************************************************************************************************
actually ,cn99 is the most available source.
then save and close sources.list

PS:
about the sources.list,you can go following site to get help:
http://www.in9.cn/htm_data/60/0705/101128.html

如何使用我们推荐的源
http://wiki.ubuntu.org.cn/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E6%88%91%E4%BB%AC%E6%8E%A8%E8%8D%90%E7%9A%84%E6%BA%90#Feisty_.287.04.29_.E7.89.88.E6.9C.AC
*******************************************************************************************************************
then we can do apt-get form the server descripted in the sources.list
even though the speed id slow:

*******************************************************************************************************************
sudo apt-get update
*******************************************************************************************************************
beacuse the speed is slow,so I wait for a long time ,about 2 hours, then ,complete the update.but some error:
*******************************************************************************************************************
Fetched 19.5MB in 2h35m22s (2087B/s)
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/feisty/Release.gpg Connection failed
Failed to fetch http://security.ubuntu.com/ubuntu/dists/feisty-security/Release.gpg Connection failed
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/edgy/Release.gpg Connection failed
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/edgy-security/Release.gpg Connection failed
Failed to fetch http://archive.ubuntu.com/ubuntu/dists/edgy-proposed/Release.gpg Connection failed
Failed to fetch http://archive.ubuntu.org.cn/ubuntu-cn/dists/edgy/restricted/i18n/Translation-en_US.bz2 Error reading from server – read (104 Connection reset by peer)
Failed to fetch http://archive.ubuntu.org.cn/ubuntu-cn/dists/edgy/multiverse/i18n/Translation-en_US.bz2 Error reading from server – read (104 Connection reset by peer)
Failed to fetch http://archive.ubuntu.org.cn/ubuntu-cn/dists/edgy/main/binary-i386/Packages.gz Connection failed
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/feisty/universe/binary-i386/Packages.gz Sub-process gzip returned an error code (1)
Reading package lists… Done
E: Some index files failed to download, they have been ignored, or old ones used instead.
*******************************************************************************************************************
but in the later ,I proved ,this is not affect my apt-get build-essential from the server.
so we don’t care it here.
*******************************************************************************************************************
then we do :
*******************************************************************************************************************
sudo apt-get install build-essential
*******************************************************************************************************************
Password:
Reading package lists… Done
Building dependency tree      
Reading state information… Done
The following extra packages will be installed:
g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev
Suggested packages:
gcc-4.1-doc lib64stdc++6 glibc-doc manpages-dev libstdc++6-4.1-doc
The following NEW packages will be installed:
build-essential g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev
0 upgraded, 6 newly installed, 0 to remove and 52 not upgraded.
Need to get 7906kB of archives.
After unpacking 33.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
linux-libc-dev libc6-dev libstdc++6-4.1-dev g++-4.1 g++
Install these packages without verification [y/N]? y
Get:1 http://ubuntu.cn99.com edgy/main build-essential 11.3 [6974B]
Get:2 http://cn.archive.ubuntu.com feisty/main libc6-dev 2.5-0ubuntu14 [3018kB]
Get:3 http://security.ubuntu.com feisty-security/main linux-libc-dev 2.6.20-16.29 [667kB]
Get:4 http://cn.archive.ubuntu.com feisty/main libstdc++6-4.1-dev 4.1.2-0ubuntu4 [1632kB]     
Err http://cn.archive.ubuntu.com feisty/main libstdc++6-4.1-dev 4.1.2-0ubuntu4                
Error reading from server. Remote end closed connection
Get:5 http://cn.archive.ubuntu.com feisty/main g++-4.1 4.1.2-0ubuntu4 [2581kB]                
Get:6 http://cn.archive.ubuntu.com feisty/main g++ 4:4.1.2-1ubuntu1 [1428B]                   
Fetched 6274kB in 12m16s (8521B/s)                                                            
Failed to fetch http://cn.archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.1/libstdc++6-4.1-dev_4.1.2-0ubuntu4_i386.deb Error reading from server. Remote end closed connection
E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

*******************************************************************************************************************
so we step to do:
*******************************************************************************************************************
sudo apt-get install build-essential –fix-missing

*******************************************************************************************************************
Reading package lists… Done
Building dependency tree      
Reading state information… Done
The following extra packages will be installed:
g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev
Suggested packages:
gcc-4.1-doc lib64stdc++6 glibc-doc manpages-dev libstdc++6-4.1-doc
The following NEW packages will be installed:
build-essential g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-libc-dev
0 upgraded, 6 newly installed, 0 to remove and 52 not upgraded.
Need to get 1632kB/7906kB of archives.
After unpacking 33.0MB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
linux-libc-dev libc6-dev libstdc++6-4.1-dev g++-4.1 g++
Install these packages without verification [y/N]? y
Get:1 http://cn.archive.ubuntu.com feisty/main libstdc++6-4.1-dev 4.1.2-0ubuntu4 [1632kB]
Fetched 1127kB in 10s (105kB/s)                                                                        
Selecting previously deselected package linux-libc-dev.
(Reading database … 88078 files and directories currently installed.)
Unpacking linux-libc-dev (from …/linux-libc-dev_2.6.20-16.29_i386.deb) …
Selecting previously deselected package libc6-dev.
Unpacking libc6-dev (from …/libc6-dev_2.5-0ubuntu14_i386.deb) …
Selecting previously deselected package libstdc++6-4.1-dev.
Unpacking libstdc++6-4.1-dev (from …/libstdc++6-4.1-dev_4.1.2-0ubuntu4_i386.deb) …
Selecting previously deselected package g++-4.1.
Unpacking g++-4.1 (from …/g++-4.1_4.1.2-0ubuntu4_i386.deb) …
Selecting previously deselected package g++.
Unpacking g++ (from …/g++_4%3a4.1.2-1ubuntu1_i386.deb) …
Selecting previously deselected package build-essential.
Unpacking build-essential (from …/build-essential_11.3_i386.deb) …
Setting up linux-libc-dev (2.6.20-16.29) …
Setting up libc6-dev (2.5-0ubuntu14) …
Setting up libstdc++6-4.1-dev (4.1.2-0ubuntu4) …
Setting up g++-4.1 (4.1.2-0ubuntu4) …
Setting up g++ (4.1.2-1ubuntu1) …

Setting up build-essential (11.3) …
*******************************************************************************************************************
In the end ,I have successully installed the build-esseantial .

转载请注明:在路上 » how to install build-essential

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 你好,我也遇到了和你一样的情况,但是你的解决方法我没太看懂,可不可以说清楚点啊,朋友?
    我QQ:406119318
    邮箱:lhuqiong@163.com
    非常期待你的指导哈
    lhuqiong10年前 (2009-07-22)回复
59 queries in 0.136 seconds, using 18.90MB memory