user308827
user308827

Reputation: 21971

Error install gdal using macports on mac

I am running Mac 10.7.5 and want to install GDAL using macports. I do this:

sudo port install gdal

But I get this error:

--->  Computing dependencies for gdal
--->  Building gdal
Error: org.macports.build for port gdal returned: command execution failed
Please see the log file for port gdal for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port gdal failed

The last part of the error in the main.log file is:

:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/work/gdal-2.0.2" && /usr/bin/make -j24 -w 
:info:build Exit code: 2
:error:build org.macports.build for port gdal returned: command execution failed
:debug:build Error code: CHILDSTATUS 78620 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for gdal: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port gdal for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_gdal/gdal/main.log

How to fix this?

Upvotes: 4

Views: 985

Answers (2)

Tim Penner
Tim Penner

Reputation: 3541

Make sure you have Xcode and the Xcode Command Line Tools installed; otherwise port wont be able to install anything and you will get errors like this. Xcode Command Line Tools is what provides the /usr/bin/make application that is being called by MacPorts.


If it still doesn't work after verifying you have Xcode and the Xcode Command Line Tools installed then it is likely due to the fact the 10.7.5 is deader then dead and not only Apple no longer supports that OS, neither do most other software vendors.

Sorry to break it to you, but it may be time to upgrade. Good news though, it's likely free!

Upvotes: 3

hmijail
hmijail

Reputation: 1140

You CAN install Homebrew together with MacPorts, and that's what I'd do, given the little you have said. If you are not careful with what you install in each packet manager you can have problems, but if you can't solve a problem like the one you reported, you don't have many more options anyway.

In any case, your problem probably is that you don't have /usr/bin/make. Try typing in Terminal "/usr/bin/make" and report back what you get.

Upvotes: 1

Related Questions