SAGE on CentOS

198 views
Skip to first unread message

Melissa

unread,
Jun 3, 2008, 7:59:20 AM6/3/08
to sage-support
Hi-

I'm sort of new to compiling things from source [and new to CentOS]. I
followed the instructions detailed in the .pdf for compiling from
source, including making sure I had the necessary repos. However, I
know it didn't work, because it took all of five seconds and after
each thing it said this: "You must set the SAGE_ROOT environment
variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/
directory."

When trying to run sage by changing into the directory and typing "./
sage", I get the following message at the bottom: "ImportError: /home/
syslin/sage-3.0.2-rhel32bit-intelx86-i686-Linux/local/lib/libpari-
gmp.so.2: cannot restore segment prot after reloc: Permission denied
<ERROR: name 'sage_prompt' is not defined>".

Also, I'm confused as to which tar I should've downloaded. I used the
RHEL one. Is this right? The OS is CentOS 5.1.

-Melissa

David Joyner

unread,
Jun 3, 2008, 10:09:43 AM6/3/08
to sage-s...@googlegroups.com
centOS is debian-based, so assuming you have 32 bit centOS, you might try
http://modular.math.washington.edu/sage/SAGEbin/linux/32bit/sage-3.0.2-debian32-intelx86-i686-Linux.tar.gz

William Stein

unread,
Jun 3, 2008, 10:26:02 AM6/3/08
to sage-s...@googlegroups.com
On Tue, Jun 3, 2008 at 7:09 AM, David Joyner <wdjo...@gmail.com> wrote:
>
> centOS is debian-based, so assuming you have 32 bit centOS, you might try

CentOS is rpm-based -- it's basically identical to RedHat.

I have built Sage from source on CentOS before (on a CentOS
supercomputer in Texas, actually), and it worked fine.

William

>

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

William Stein

unread,
Jun 3, 2008, 10:28:22 AM6/3/08
to sage-s...@googlegroups.com

By the way, given that we don't make centos binaries,
I *do* recommend you build from source.

1. Download the top listed tarball here:
http://sagemath.org/dist/src
2. tar xvf sage-3.0.2.tar
3. cd sage-3.0.2
4. make
5. Wait 2 hours
6. Done.

If it immediately fails that's because you need one
of the prerequisite packages. There are very few:

gcc, g++, make, m4, perl, and ranlib

mabshoff

unread,
Jun 3, 2008, 10:33:18 AM6/3/08
to sage-support


On Jun 3, 1:59 pm, Melissa <toxyouxunkn...@gmail.com> wrote:
> Hi-

Hi Melissa,

> I'm sort of new to compiling things from source [and new to CentOS]. I
> followed the instructions detailed in the .pdf for compiling from
> source, including making sure I had the necessary repos. However, I
> know it didn't work, because it took all of five seconds and after
> each thing it said this: "You must set the SAGE_ROOT environment
> variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/
> directory."
>
> When trying to run sage by changing into the directory and typing "./
> sage", I get the following message at the bottom: "ImportError: /home/
> syslin/sage-3.0.2-rhel32bit-intelx86-i686-Linux/local/lib/libpari-
> gmp.so.2: cannot restore segment prot after reloc: Permission denied
> <ERROR: name 'sage_prompt' is not defined>".

You have SELinux enabled which causes the above problem. You can
either disabled SELinux or relabel the libraries of Sage. How to do
that can be found at

http://www.ittvis.com/services/techtip.asp?ttid=3092

But that is not Centos specific. Others on this list run Sage with
SELinux enabled, so hopefully they can give you more detailed input
what to do.

> Also, I'm confused as to which tar I should've downloaded. I used the
> RHEL one. Is this right? The OS is CentOS 5.1.

Yes, the RHEL ones should run out of the box on a Centos install [i.e.
RHEL 5 is the same as Centos 5, RHEL 5 Update 1 is Centos 5.1]. The
CPU type should obviously match.

> -Melissa

Cheers,

Michael

David Joyner

unread,
Jun 3, 2008, 10:35:43 AM6/3/08
to sage-s...@googlegroups.com
On Tue, Jun 3, 2008 at 10:09 AM, David Joyner <wdjo...@gmail.com> wrote:
> centOS is debian-based, so assuming you have 32 bit centOS, you might try

Sorry, this is wrong - I badly misread the info at http://www.centos.org/

Melissa

unread,
Jun 3, 2008, 1:09:34 PM6/3/08
to sage-support
Michael-


>
> You have SELinux enabled which causes the above problem. You can
> either disabled SELinux or relabel the libraries of Sage. How to do
> that can be found at
>
> http://www.ittvis.com/services/techtip.asp?ttid=3092
>
> But that is not Centos specific. Others on this list run Sage with
> SELinux enabled, so hopefully they can give you more detailed input
> what to do.
>


Thank you so much. This was extremely helpful. I temporarily disabled
SELinux, and it worked like a charm. =) I will take a look at the
website you provided to learn more about how to run it with SELinux
enabled!

Thanks again!

-Melissa
Reply all
Reply to author
Forward
0 new messages