简体   繁体   English

自制安装g ++ 4.7无法正常工作

[英]Homebrew install g++ 4.7 not working

all over the internet you can find explanations where people forget to mention something. 在互联网上,您可以找到人们忘记提某事的解释。 Could you please give me a complete explanation on how to install g++ 4.7 on my os x yosemite? 您能否给我完整的解释,说明如何在os x优胜美地上安装g ++ 4.7? I used the following commands: 我使用了以下命令:

1) ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )" 1)ruby -e“ $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )”

2) brew tap homebrew/versions 2)酿造自酿啤酒/版本

3) brew install gcc47 3)brew安装gcc47

Seems to have worked according to the success messages. 似乎已根据成功消息进行了工作。 And still, the program that I want to install (which needs g++ 4.7 or higher) fails because there is no g++ 4.7 而且,我要安装的程序(需要g ++ 4.7或更高版本)失败,因为没有g ++ 4.7

What to do? 该怎么办?

Okay, found the answer. 好的,找到答案了。 It is: Don't use homebrew :-P 它是:不要使用自制程序:-P

This worked for me: Install macports, ie download the .pkg file from the homepage, double-click it and say yes yes yes, confirm, yes agree credit card yes np, confirm, ok ok ok, cya 这对我有用:安装macports,即从主页下载.pkg文件,双击并说是是是,确认,是,同意信用卡是np,确认,确定,确定,确定

Then start a terminal (If you had one opened before the macports install you need to restart it!) 然后启动一个终端(如果在安装Macports之前打开了一个终端,则需要重新启动它!)

Then use these commands: 然后使用以下命令:

sudo port selfupdate sudo端口selfupdate

sudo port install gcc47 须藤端口安装gcc47

sudo port select --set gcc mp-gcc47 sudo端口选择--set gcc mp-gcc47

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

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