Ask Your Question
0

sage command crashes with libgap.so.0 error

asked 2022-05-31 06:45:22 +0200

It displays

ImportError: libgap.so.0: cannot open shared object file: No such file or directory

I am running it on WSL2, installed it via sudo apt-get install sagemath.

How am I supposed to resolve this error?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-06-04 18:05:45 +0200

ortollj gravatar image

Hi Magma5558

first install WSL2 https://docs.microsoft.com/en-us/wind... then in the Linux window:

sudo apt update
sudo apt upgrade

sudo apt-get install  bc binutils bzip2 ca-certificates cliquer cmake curl ecl eclib-tools fflas-ffpack flintqs g++ g++ gcc gcc gengetopt gfan gfortran glpk-utils gmp-ecm lcalc libatomic-ops-dev libboost-dev libbraiding-dev libbrial-dev libbrial-groebner-dev libbz2-dev libcdd-dev libcdd-tools libcliquer-dev libcurl4-openssl-dev libec-dev libecm-dev libffi-dev libflint-arb-dev libflint-dev libfreetype6-dev libgc-dev libgd-dev libgf2x-dev libgiac-dev libgivaro-dev libglpk-dev libgmp-dev libgsl-dev libhomfly-dev libiml-dev liblfunction-dev liblrcalc-dev liblzma-dev libm4rie-dev libmpc-dev libmpfi-dev libmpfr-dev libncurses5-dev libntl-dev libopenblas-dev libpari-dev libpcre3-dev libplanarity-dev libppl-dev libprimesieve-dev libpython3-dev libqhull-dev libreadline-dev librw-dev libsingular4-dev libsqlite3-dev libssl-dev libsuitesparse-dev libsymmetrica2-dev libz-dev libzmq3-dev libzn-poly-dev m4 make nauty openssl palp pari-doc pari-elldata pari-galdata pari-galpol pari-gp2c pari-seadata patch perl pkg-config planarity ppl-dev python3 python3 python3-distutils r-base-dev r-cran-lattice singular sqlite3 sympow tachyon tar tox xcas xz-utils xz-utils

cd ~
wget http://www.mirrorservice.org/sites/www.sagemath.org/src/sage-9.5.tar.gz
tar xvf sage-9.5.tar.gz

cd sage-9.5
./configure

make
nano ~/.bashrc # add this line below at the end of bashrc
alias sage=~/sage-9.5/sage

Close ubuntu then reopen it.

edit sage_nb.sh 
nano ~/sage_nb.sh

put these 3 lines into it:

#!/bin/bash
cd /mnt/c/Documents\ and\ Settings/UserW10
/home/UserLinux/sage-9.5/sage --notebook

chmod ug+x sage_nb.sh

./sage_nb.sh

Create windows shortcut

    Open Windows explorer, and type %APPDATA%\Microsoft\Windows\Start Menu\Programs
    Make a copy of any of the program icons – we’ll customise it to do what we want
    Right-click, and choose properties.
    On the General tab:
        Change the name to whatever you want.
    On the Shortcut tab:
        Change Target to: C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps\ubuntu.exe run ~/sage_nb.sh
        Change Start in to: %USERPROFILE%
        Change Run to: Minimised
        Change the icon if you want – there are plenty of pieces of software that can create a .ico icon file one from an image file.

# UserW10= Users name,UserLinux = Linux Users name :
# where ubuntu.exe is located (for me Ubuntu2004.exe not ubuntu.exe!):
C:\Users\UserW10\AppData\Local\Microsoft\WindowsApps
edit flag offensive delete link more

Comments

change sage-9.5 by sage-9.6 in the code above for the last update.

ortollj gravatar imageortollj ( 2022-06-04 18:10:23 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-05-31 06:45:22 +0200

Seen: 149 times

Last updated: Jun 04 '22