我一直在努力在我的Debian机器上安装g 7.我能够很容易地在我的Mac上安装它(因为自制软件有一个公式).但是我似乎找不到在Linux上安装它的方法.
关于安装g 4.9的This individual had a thread,并更改了他给出的网址to this page,这似乎是朝着正确的方向……但我想这样安装它可能会导致一些潜在的问题,当我希望更新这些包.
有没有我缺少的消息来源?或者是否有一个地方可以下载并编译我需要的所有内容以使其运行?
谢谢您的帮助.
有用数据:
我的内核是x86_64 Linux 3.16.0-4-amd64.
编辑:按照迪特里希的建议,我现在遇到一个新的错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gcc-7 : Depends: cpp-7 (= 7-20170316-1) but it is not going to be installed
Depends: libcc1-0 (>= 7-20170316-1) but it is not going to be installed
Depends: binutils (>= 2.28) but 2.25-5+deb8u1 is to be installed
Depends: libgcc-7-dev (= 7-20170316-1) but it is not going to be installed
Depends: libisl15 (>= 0.15) but it is not installable
Depends: libmpfr4 (>= 3.1.3) but 3.1.2-2 is to be installed
Depends: libstdc++6 (>= 5) but 4.9.2-10 is to be installed
E: Unable to correct problems,you have held broken packages.
这就是我的sources.list设置方式:
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
###### Debian Update Repos
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://ftp.us.debian.org/debian/ jessie-proposed-updates main contrib non-free
###### For ffmpeg
deb http://www.deb-multimedia.org jessie main non-free
###### For gcc-7 (Experimental)
deb http://httpredir.debian.org/debian experimental main
正如你所说的那样,我猜这是我在Debian稳定的问题吗?为了解决这个错误,我需要做些什么,同时保持稳定?
编辑2:好的,所以我想出了最后一个错误.我只需要为我遇到麻烦的每个依赖添加,并使用apt-get install -t testing进行安装.谢谢所有回复的人.你们都非常乐于助人.
GCC 7尚未发布,正如您在GCC 7 release notes中所看到的:
Disclaimer: GCC 7 has not been released yet,so this document is a work-in-progress.
您可能想了解是什么让不同的Linux发行版有所不同.尤其是rolling distribution是什么,以及Debian releases是如何工作的.在滚动发行版中,所有包都会不断更新到更新的版本. Debian 8.7(Jessie / stable)不是滚动发行版.软件包版本已冻结,仅在必要时进行更新,以提高稳定性. Debian 8.7上最新版本的GCC是GCC 4.9.
Debian 9.0(Stretch / testing)是一个滚动版本,至少在它被冻结之前.如果您将计算机切换到Stretch,您将获得GCC 6.3.
如果你需要更新的东西,你可以切换到Sid(不稳定),或者从Sid固定包.
但是,GCC 7是only available in experimental,因为尚未发布.如果您愿意,可以从实验中安装单个软件包,有关说明,请参阅Debian Experimental.
如何
添加到您的/etc/apt/sources.list
https://wiki.debian.org/DebianExperimental
然后
apt-get update
apt-get -t experimental install gcc-7