How to install g++ 4.4 on Ubuntu?

2019-02-13 18:00发布

There is a Debian g++-4.4 package, but it's not Ubuntu. There are too many system-destroyed scary stories on the web.

How can I install g++ 4.4 on Ubuntu?

标签: ubuntu g++
7条回答
爷、活的狠高调
2楼-- · 2019-02-13 18:13

Have a look at this URL. I installed gcc-4.4 (and g++-4.4) from there, which seem to be the most official group of hackers that actually put gcc-4.4 into an ubuntu .deb. Till now running without problems :

https://launchpad.net/~ubuntu-toolchain/+archive/ppa

Regards.

查看更多
SAY GOODBYE
3楼-- · 2019-02-13 18:24

From your terminal type sudo apt-get install g++. It's been working great for me!

查看更多
时光不老,我们不散
4楼-- · 2019-02-13 18:25

I recomend you install build-essential package that contains g++.

Type it in your terminal:

$ sudo apt-get install build-essential

Then confirm installation.

查看更多
我欲成王,谁敢阻挡
5楼-- · 2019-02-13 18:31

Debian packages should work on Ubuntu. It is based on Debian.

Edit: Try this :

sudo apt-get install gcc-snapshot
查看更多
狗以群分
6楼-- · 2019-02-13 18:31

If it is in a debian repository, it should would under Ubuntu no problem. If you would like to add a repository, simply follow the directions here.

查看更多
叼着烟拽天下
7楼-- · 2019-02-13 18:34

I would recommend against it. Requiring a newer version of g++ will require that if you use any new features of 4.4 then your users will also require a 4.4 runtime library. That being said, I would just download the source, ./configure --ALLMYOPTS&&make && sudo make install. If you want to make a gcc similar to the one shipped with Ubuntu, apt-get source gcc and look in debian/rules for their configure flags (they may be applied on multiple lines).

查看更多
登录 后发表回答