-
Notifications
You must be signed in to change notification settings - Fork 19
InstallationMacOSSource
To install Biodiverse from source for macOS four broad steps are required. First, if you haven't already, you will have to install Xcode command line tools. Second, a software management system has to be installed which can be used to install software required by Biodiverse. Third, Biodiverse requires a higher version of perl than that installed by default on macOS. This and Biodiverse's perl modules dependancies will be install. Fourth, Biodiverse will be installed.
Note that Homebrew is only supported on recent versions of OSX, so if you have an old operating system then these instructions might not work cleanly (e.g. gdal will not install cleanly under Yosemite).
To install Xcode command line tools (and all following software) you will be using the Terminal application. To open Terminal:
- Double-click the Terminal application in the Applications:Utilities folder. Or do a Spotlight search for "Terminal" and open it.
- Copy and paste the below text at the terminal prompt and then hit return.
xcode-select --install
- Once this is install you will need to agree the Apple's software licence.
Enter your password when prompted.
sudo xcodebuild -license
Homebrew is a package management system which simplifies the installation of software on Apple's macOS operating system. It is used to install software required by Biodiverse.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
-
Some extra packages are required which are not part of the base Homebrew installation. Install these:
brew tap homebrew/boneyard brew tap osgeo/osgeo4mac
-
Install the Geospatial Data Abstraction Library (gdal)
brew install https://raw.githubusercontent.com/OSGeo/homebrew-osgeo4mac/master/boneyard/gdal-20.rb
-
Install other required packages:
brew install gdk-pixbuf pango gtk+ gtk+3 libglade
-
libgnomecanvas needs to be patched to avoid a serious memory leak
brew edit libgnomecanvas # insert these lines into the build, immediately after the line containing "def install": # system "\curl -L https://raw.githubusercontent.com/shawnlaffan/biodiverse/master/etc/libgnomecanvas.patch > libgnomecanvas.patch" # system "patch -d libgnomecanvas < libgnomecanvas.patch" # then exit the editor brew install --build-from-source libgnomecanvas
Further information about Homebrew can be found here.
perlbrew is an admin-free perl installation management tool. It can be used to install a version of perl that Biodiverse requires.
- Copy and paste this line into your terminal to install perlbrew:
\curl -L https://install.perlbrew.pl | bash
- Install the version of perl that Biodiverse requires and then use it:
~/perl5/perlbrew/bin/perlbrew install perl-5.26.1 ~/perl5/perlbrew/bin/perlbrew switch perl-5.26.1
- Install cpanminus for installing other perl modules:
perlbrew install-cpanm
- Install all other Biodiverse required perl modules:
cpanm --force Gtk2 cpanm Pango Gnome2::Canvas IO::Socket::SSL.pm Glib::Object::Introspection Scalar::Util::Numeric # this assumes your goal installed to the Cellar - update as needed PERL_GDAL_CONFIG=/usr/local/Cellar/gdal-20/2.1.0/bin/gdal-config cpanm --force Geo::GDAL
-
Install the rest of the Biodiverse perl dependencies
cpanm Task::Biodiverse::NoGUI cpanm Task::Biodiverse
-
Install Biodiverse either from source or by cloning the git repository. If using git then to install at the top level of your home directory:
cd ~ git clone https://github.com/shawnlaffan/biodiverse.git
-
To run biodiverse switch to the correct version of perl if you haven't already and then run biodiverse:
~/perl5/perlbrew/bin/perlbrew switch perl-5.24.0 perl ~/biodiverse/bin/BiodiverseGUI.pl
Back to the main installation page.