简体   繁体   中英

How do I get g++/gcc 4.6 on my Ubuntu 11.04 (Natty Narwhal)?

I've been googling for the last half an hour and can't seem to find the answer to this - I want g++/gcc 4.6 for my Ubuntu install so I can get all the new cool C++0x features. I tried installing the g++-4.6_4.6.1-9ubuntu3_386.deb package but I get an error in the software center. (Dependency is not satisfiable: gcc-4.6-base)

Can anyone please help me?

Thanks!

You can build a gcc/g++ 4.6 tool chain from scratch. I remember there is a tool can do this for you, it need you specify the gcc and glib version, and it will download/build whole tool chain for you, but I can't remember the tool's name now. Any way, you can start from Installing GCC ;O)

Natty Narwhal is almost a year old. There is already 11.10 Oneiric Ocelot and that has gcc 4.6.1 . Upgrading the system to Oneiric is the easiest way. It's as easy as switching the suite in /etc/apt/sources.list and starting synaptic or aptitude and running update+upgrade.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM