user3234547
user3234547

Reputation: 1

Installing gcc on a Mac 10.9

installing gcc on a mac. everything worked fine until I got to the terminal command: sudo port select -set gcc mp-gcc48

I get the following error: Usage: port [-bcdfknopqRstuvy] [-D portdir] [-F cmdfile] action [privopts] [actionflags] [[portname|pseudo-portname|port-url] [@version] [+-variant]… [option=value]…]…

“port help” or “man 1 port” for more information.

Can you offer any help?

Upvotes: 0

Views: 276

Answers (2)

rchapman
rchapman

Reputation: 91

I would recommend installing with Homebrew http://brew.sh

Install Homebrew, update, make sure the brew doctor is happy, then run:

brew tap Homebrew/versions
brew install gcc48

Upvotes: 0

andypea
andypea

Reputation: 1401

The --set option is not actual needed here, but if you include it should be preceded by two hyphens:

sudo port select --set gcc mp-gcc48

MacPorts gives you much better feedback if you start it in interactive mode and then type in the required commands:

hostname:~ username$ sudo port
MacPorts 2.2.1
Entering interactive mode... ("help" for help, "quit" to quit)
[Users/username] > select gcc mp-gcc48
Selecting 'mp-gcc45' for 'gcc' succeeded. 'mp-gcc48' is now active.

Upvotes: 1

Related Questions