install:macos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
install:macos [2021/03/25 10:24] – [Full script] paffenholzinstall:macos [2023/02/02 15:16] casabella
Line 1: Line 1:
 ===== Install polymake on Mac OS ===== ===== Install polymake on Mac OS =====
  
-The latest release 4.should work on all Mac OS versions greater or equal to 10.14. The installation requires a couple of steps (of which you have maybe done some already for other reasons):+The latest release 4.should work on all Mac OS versions greater or equal to 11. The installation requires a couple of steps (of which you have maybe done some already for other reasons):
   * Install the xcode command line tools   * Install the xcode command line tools
   * (for some versions) install SDK headers   * (for some versions) install SDK headers
Line 19: Line 19:
 In the terminal type In the terminal type
 <code>xcode-select --install</code> <code>xcode-select --install</code>
-Either this tells you that your command line tools are installed or opens a small window that asks you whether you want to install them. Confirm. It also offers to install the full XCode IDE. This is **not** neccessary and **not** recommended (you then need to install the command line tools on top from whithin XCode). +Either this tells you that your command line tools are installed or opens a small window that asks you whether you want to install them. Confirm. It also offers to install the full XCode IDE. This is **not** necessary and **not** recommended (you then need to install the command line tools on top from within XCode). 
  
-On MacOS **10.14** you may need an additional step. Run  +Then, you should type
-<code>ls /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/EXTERN.h</code> +
-If that returns a //File not found// error then run +
-<code>sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -allowUntrusted -target /</code> +
-This will ask for your password. You need to be an administrator of your Mac to run this command. If this fails, then run +
-<code> +
-softwareupdate -l +
-softwareupdate -i "Command Line Tools (macOS Mojave version 10.14) for Xcode-10.3" +
-</code> +
-where you may need to replace the string in the second command to the one that looks similar in the return of the first command. Then repeat the previous installer command. It should now succeed. +
- +
-On **10.15**, you should do+
 <code> <code>
 export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/ export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/
Line 40: Line 29:
 ==== Install Homebrew ==== ==== Install Homebrew ====
  
-Installation instructions are [[https://brew.sh/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line!+Installation instructions are [[https://brew.sh/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal, that is: 
 + 
 +<code> 
 +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 
 +</code>
  
 ==== Install Perlbrew ==== ==== Install Perlbrew ====
  
-Installation instructions are  [[https://perlbrew.pl/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal. Make sure you copy the whole line!+Installation instructions are  [[https://perlbrew.pl/|here]]. In most cases it should be sufficient to copy and execute the first code line on that page into your terminal, that is:
  
-Now add some paths to your Terminal config and reload the config. For versions prior to 10.15 do 
 <code> <code>
-echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.bash_profile +\curl -L https://install.perlbrew.pl | bash
-echo "source ~/perl5/perlbrew/etc/bashrc" >> $HOME/.bash_profile +
-echo 'export ARCHFLAGS="-arch x86_64"' >> $HOME/.bash_profile +
-source $HOME/.bash_profile+
 </code> </code>
-and for 10.15 and 11 do + 
 +Now add some paths to your Terminal config and reload the configType the following lines in the terminal:
 <code> <code>
 echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.zshrc echo "export PERL5LIB=$HOME/perl5/lib/perl5:$HOME/perl5${PERL5LIB+:$PERL5LIB}" >> $HOME/.zshrc
Line 63: Line 53:
 ==== Install dependencies with Homebrew ==== ==== Install dependencies with Homebrew ====
  
-Run the collowing lines in your terminal:+Run the following lines in your terminal:
 <code> <code>
 brew install gmp brew install gmp
Line 85: Line 75:
 cpanm SVG cpanm SVG
 cpanm Moo cpanm Moo
-cpanm ZEFRAM/Module-Runtime-0.013.tar.gz 
 cpanm MongoDB cpanm MongoDB
 cpanm JSON cpanm JSON
 cpanm install Net::SSLeay cpanm install Net::SSLeay
-</code> 
- 
-On **10.15** and later do 
-<code> 
 cpanm Term::ReadLine::Gnu cpanm Term::ReadLine::Gnu
 </code> </code>
- 
-On **10.14** and earlier do 
-<code> 
-brew link --force readline 
-cpanm Term::ReadLine::Gnu 
-brew unlink readline 
-</code> 
- 
  
 ==== Install a python dependence ==== ==== Install a python dependence ====
Line 109: Line 86:
 pip3 install jupyter --user pip3 install jupyter --user
 </code> </code>
-This may complain about a path not beeing set. If so, add this to your $PATH-variable. +This may complain about a path not being set. If so, add this to your $PATH-variable. 
  
 ==== Download polymake ==== ==== Download polymake ====
Line 115: Line 92:
 You find the sources [[download:start|here]]. Get the source tarball from the Linux section of that page. Download to //Downloads//. You find the sources [[download:start|here]]. Get the source tarball from the Linux section of that page. Download to //Downloads//.
  
-in the terminal do+In the terminal do
 <code> <code>
 cd Downloads cd Downloads
-tar -xvfj polymake-4.3.tar.bz2+tar -xvfj polymake-4.9.tar.bz2
 </code> </code>
  
 ==== Configure and install polymake ==== ==== Configure and install polymake ====
  
-Essentially, polymake is compiled and installed with the following commands. This will put the polymake binary into ''/usr/local''.+Essentially, polymake is compiled and installed with the following commands. This will put the polymake binary into ''/usr/local''. You may have to use ''sudo'' for installing.
  
 <code> <code>
-cd ~/Downloads/polymake-4.3+cd ~/Downloads/polymake-4.9
 ./configure --without-java ./configure --without-java
 ninja -C build/Opt -j2 install ninja -C build/Opt -j2 install
 </code> </code>
  
-However, we recommend to install into a directory in your $HOME-folder, in particular for MacOS 10.15. For this, create a folder with+However, we recommend to install into a directory in your $HOME-folder. For this, create a folder with
 <code> <code>
 mkdir $HOME/<polymake_install_folder> mkdir $HOME/<polymake_install_folder>
Line 138: Line 115:
  
 <code> <code>
-cd ~/Downloads/polymake-4.3+cd ~/Downloads/polymake-4.9
 ./configure --without-java --prefix=$HOME/<polymake_install_folder> ./configure --without-java --prefix=$HOME/<polymake_install_folder>
 ninja -C build/Opt -j2 install ninja -C build/Opt -j2 install
Line 148: Line 125:
 </code> </code>
 or add ''$HOME/<polymake_install_folder>/bin/'' to your path. or add ''$HOME/<polymake_install_folder>/bin/'' to your path.
- 
-==== Full script ==== 
- 
-[[https://gist.github.com/apaffenholz/a406c3d862f18345c56eddc21907808f|Here]] is also a script for **10.15** and **11.1** that does almost all these steps and allows some configuration. 
  • install/macos.txt
  • Last modified: 2024/04/11 16:57
  • by paffenholz