From Funtoo
Revision as of 16:10, March 19, 2017 by Palica (talk | contribs) (Installation)
Jump to: navigation, search

SageMath is mathematical software with features covering many aspects of mathematics, including algebra, combinatorics, numerical mathematics, number theory, and calculus.

Screenshot from SageMath


There are two overlays that are needed to get Sage installed. The science-overlay and the sage-on-gentoo-overlay.

Install and configure layman and overlays

  1. The preferred way of getting sage-on-gentoo is layman. Make sure layman is installed with USE=git and correctly configured. You may find a guide for layman at:
  2. Update your layman list:
layman -L

This overlay depends on the science overlay. So you will need to add it as well if it is not already installed:

layman -a science

Finally add this overlay:

layman -a sage-on-gentoo
Steps 3 and 4 may not be fully or at all necessary on your system. You might want to try skipping to step 5 first, and if it doesn't work, coming back and doing steps 3 and 4.
  1. Unmask ebuilds: Before being able to install you may need to unmask the required ebuilds. You can make use of the following files, which already contain all required entries:

To use this file permanently, place symbolic link to this file into your /etc/portage/package.unmask directory:

   ln -s <path-to-layman>/sage-on-gentoo/package.unmask/sage \

Otherwise, simply copy it into the respective directory for a one-time fix.

  1. Add use-flags for ebuild: Since Sage's ebuild requires its dependencies to be built with several USE- flags a standard package.use file is provided as well:
   ln -s <path-to-layman>/sage-on-gentoo/package.use/sage \

you may also need the following file:

   ln -s <path-to-layman>/sage-on-gentoo/package.use/sage-unstable \
   <path-to-layman> is usually /var/lib/layman (this path used to be /usr/local/portage/layman for older version of layman).
   Note: For sage 6.8 we also provide a file 99sage-doc-bin that makes it easy to use pre-built html documentation. This is recomended for ~arch users.

  1. Install Sage: Type:
   emerge -va sage
   to install sage; please note that this will pull in a lot of dependencies. If you can not proceed with this step (because of circular dependencies, missing USE-flags, and so on) please report this behavior.