Ubuntu 14.04安装gcc-4.5和g ++ 4.5

时间:2014-10-13 11:06:25

标签: gcc g++ install ubuntu-14.04

我正在尝试在Ubuntu 14.04 sudo apt-get install gcc-4.5 g++-4.5 gcc-multilib g++-multilib上安装gcc-4.5和g ++ - 4.5但是出现了以下错误:

Package gcc-4.5 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

Package g++-4.5 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 'gcc-4.5' has no installation candidate
E: Package 'g++-4.5' has no installation candidate

谁能告诉我我需要做什么?

1 个答案:

答案 0 :(得分:0)

gcc-4.5或g ++ 4.5不适用于大多数Ubuntu软件发行版。如果您想要获得此版本,请参阅gcc releasessuccessful builds

另一个选择是使用“PPA for Ubuntu Toolchain Uploads (restricted)” team的版本。在您的情况下,添加

deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu trusty main 
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu trusty main

到您的源列表,然后运行sudo apt-get update。您将能够使用sudo apt-get install gcc-4.5