I am trying to install ghostcript on Macports 2.2.1-10.0-Mavericks. I get the following message:

**checking for gcc... /usr/bin/clang checking whether the C compiler works... no configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_print_ghostscript/ghostscript/work/ghostscript-9.10':
configure: error: C compiler cannot create executables See `config.log' for more details Command failed:  cd
&& ./configure --prefix=/opt/local --disable-compile-inits
--disable-cups --disable-dbus --disable-gtk --without-luratech --with-system-libtiff --with-x  Exit code: 77 Error: Failed to configure ghostscript, consult
Error: org.macports.configure for port ghostscript returned: configure
failure: command execution failed Warning: targets not executed for
ghostscript: org.macports.activate org.macports.configure
org.macports.build org.macports.destroot org.macports.install Please
see the log file for port ghostscript for details:
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets Error: Processing of port ghostscript failed**

Any ideas how to solve this?

  • Please use code formatting for Terminal output! Quote formatting is very difficult to read. – grg Feb 16 '14 at 17:32
  • Have you installed the Xcode command line tools? – mmmmmm Feb 16 '14 at 18:13
  • I too am having the same problem. Yes, I accepted the license and yes I installed the command line tools but I still can't build anything via MacPorts. So I removed xcode and re-installed from scratch. Now when I try to install the command line tools I get the message that it can't be installed because "it is not currently available from the Software Update server." very frustrating. – user75285 Apr 9 '14 at 17:17

You either didn't install the Xcode Command Line Tools (use xcode-select --install to do that), or didn't accept the Xcode License agreement (that can be achieved using sudo xcodebuild -license).

Once you've completed both of these checks, configure should correctly pick up the working compiler.

MacPorts 2.3 will contain checks to detect and warn you about these problems.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .