-
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.
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 osgeo/osgeo4mac
-
Install the Geospatial Data Abstraction Library (gal)
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
-
Tell perl where to find the gdal configuration script (might not need this. Better to set PERL_GDAL_CONFIG with the installation of Geo::GDAL below:
export PERL_GDAL_CONFIG=/usr/local/Cellar/gdal-20/2.1.0/bin/gdal-config
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.24.0 ~/perl5/perlbrew/bin/perlbrew switch perl-5.24.0
- Install cpanminus for installing other perl modules:
cpan App::cpanminus
- Install all other Biodiverse required perl modules:
cpanm Pango Gnome2::Canvas IO::Socket::SSL.pm Glib::Object::Introspection PAR::Packer Scalar::Util::Numeric cpanm --force Gtk2 PERL_GDAL_CONFIG=/usr/local/Cellar/gdal-20/2.1.0/bin/gdal-config cpanm --force Geo::GDAL
-
Install the Biodiverse perl modules
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.