简体   繁体   English

gcc-4.7与Debian 8 Jessie

[英]gcc-4.7 with Debian 8 Jessie

I use debian 8 Jessie, which has only gcc-4.9 available in the repositories. 我使用的是Debian 8 Jessie,它在存储库中只有gcc-4.9。 I tried to install gcc-4.7 in two ways without success. 我尝试以两种方式安装gcc-4.7,但未成功。

First try 第一次尝试

I tried installing gcc manually by downloading the file gcc-4.7.0.tar.gz But when I install the dependency libraries (apt-get install Libmpc-dev libmpfr-dev libgmp-dev gcc-multilib) the Debian installs, without asking gcc-4.9 and the compatible libraries with gcc-4.9. 我尝试通过下载文件gcc-4.7.0.tar.gz来手动安装gcc,但是当我安装依赖库(apt-get install Libmpc-dev libmpfr-dev libgmp-dev gcc-multilib)时,Debian会安装而不询问gcc -4.9以及与gcc-4.9兼容的库。 I try run make for manual installation, but errors occur and it is not possible to install manually. 我尝试运行make进行手动安装,但是会出现错误,并且无法手动安装。

Second Try 第二次尝试

I tried adding PPA repositories with gcc-4.7, in the file /etc/apt/sourc.list Add-apt-repository ppa: ubuntu-toolchain-r / test as it teaches in this Link: https://askubuntu.com/questions/193513/problem-adding-a-ppa-to-install-gcc-4-7 我尝试在文件/etc/apt/sourc.list中添加带有gcc-4.7的PPA信息库Add-apt-repository ppa:ubuntu-toolchain-r / test,如其在此链接中所述: https : //askubuntu.com/问题/ 193513 /问题-添加ppa到安装gcc-4-7

When try apt-get install gcc-4.7 you are prompted to install several Dependencies ... when requesting to install the dependencies, the Below. 尝试apt-get install gcc-4.7时,系统会提示您安装多个依赖项...当请求安装依赖项时,将显示以下内容。


Root @ vmhp110deb8: / home / user1 # apt-get install gcc-4.7 gcc-4.7-base
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Note, by selecting 'gcc-4.7-base' for regex 'gcc-4.7'
Package gcc-4.7-base is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
Is available from another source

E: Package 'gcc-4.7-base' has no installation candidate
Root @ vmhp110deb8: / home / user1 # add-apt-repository ppa: ubuntu-toolchain-r / test

I tried to find a repository that has gcc-4.7-base, but then it asks Installation of other dependencies, and informs that it has not found Libraries are Obsolete, etc. 我试图找到一个具有gcc-4.7-base的存储库,但随后它要求安装其他依赖项,并通知它尚未发现库已过时,等等。

Attempt not yet tested 尝试尚未测试

Another idea that i had is download the Debian 7 Wheezy DVD (which I think Which has gcc-4.7 and all dependencies) and add as repository, For debian to find all dependencies of gcc.4.7 on DVD. 我的另一个想法是下载Debian 7 Wheezy DVD(我认为它具有gcc-4.7和所有依赖项)并添加为存储库,以便Debian在DVD上查找gcc.4.7的所有依赖项。 But this idea i not have tested yet. 但是这个想法我还没有测试过。

Could anyone help me with how I could install gcc 4.7 on debian 8? 谁能帮我在debian 8上安装gcc 4.7?

As you can read here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765379 您可以在这里阅读https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765379

gcc-4.7 is not included in Debian Jessie Debian Jessie中不包含gcc-4.7

Maybe you can try this 也许你可以试试看

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7

EDIT : You already tries this. 编辑:您已经尝试过了。 I didnt notice. 我没有注意到。

Try this manual: http://charette.no-ip.com:81/programming/2011-12-24_GCCv47/ 试试这个手册: http : //charette.no-ip.com : 81/programming/2011-12-24_GCCv47/

I hope this helps to you :) 希望对您有帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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