Re: ImportError: cannot import name md5

2,132 views
Skip to first unread message

Volker Braun

unread,
Jul 31, 2012, 6:07:38 PM7/31/12
to sage-s...@googlegroups.com, qwert...@chammy.info
Whats the output of "sage -sh ldd local/lib/python/lib-dynload/_hashlib.so"?

It should only depend on glibc, keyutils-libs, libselinux, and krb5-libs, which are quite certainly already installed.


Its probably easiest to compile your own Sage install. Just first install

yum install gcc gcc-gfortran gcc-c++ m4 perl ranlib ImageMagick atlas atlas-devel mercurial openssl-devel






On Tuesday, July 31, 2012 3:29:59 PM UTC-4, qwert...@chammy.info wrote:
I posted this to asksage but have not gotten any responses. I get the following error when I run sage:

ERROR:root:code for hash md5 was not found.

There is a similar problem posted here:

http://ask.sagemath.org/question/1432/code-for-hash-md5-was-not-found-after-fresh-sage

and the solution says to install libssl0.9.8. However, searches for libssl return OpenSSL and I already have OpenSSL and the ancillary devel libraries installed:

OpenSSL 1.0.0j-fips 10 May 2012

Moreover, the only lib I can find on my system that mentions ssl is libssl3.so.


More information about my machine:

Linux my.box.net 3.4.6-2.fc17.x86_64 #1 SMP Thu Jul 19 22:54:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Linux version 3.4.6-2.fc17.x86_64 (mock...@buildvm-09.phx2.fedoraproject.org) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Thu Jul 19 22:54:16 UTC 2012

Fedora release 17 (Beefy Miracle)

Volker Braun

unread,
Aug 1, 2012, 7:04:18 PM8/1/12
to sage-s...@googlegroups.com, qwert...@chammy.info
Yep its pretty clear that this can't work. Just compile from source, its easy and fun ;-)



On Wednesday, August 1, 2012 3:21:26 PM UTC-4, qwerty6789 wrote:
I get the same error when I try to build the source code, too:

$ make
cd spkg && \
"../spkg/pipestatus" \
    "env SAGE_PARALLEL_SPKG_BUILD='' ./install all 2>&1" \
    "tee -a ../install.log"
Nothing to (re)build / all up-to-date.
./sage -b

----------------------------------------------------------
sage: Building and installing modified Sage library files.

Installing c_lib

ERROR:root:code for hash md5 was not found.



This is the output that you requested:

$ ./sage -sh ldd local/lib/python/lib-dynload/_hashlib.so
    linux-vdso.so.1 =>  (0x00007fff14fff000)
    libssl.so.6 => not found
    libcrypto.so.6 => not found
    libpython2.7.so.1.0 => /opt/sage-5.1-linux-64bit-red_hat_enterprise_linux_server_release_5.6_tikanga-x86_64-Linux/local/lib/libpython2.7.so.1.0 (0x00007f702221c000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7022000000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f7021c48000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f7021a44000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007f7021841000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f7021545000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003b57e00000)


I tried just linking /usr/lib64/libssl.so.1.0.0j and /usr/lib64/libcrypto.so.1.0.0j to libssl.so.6 and libcrypto.so.6, respectively, but then sage just segfaults. Is it possible that sage does not work with the latest version of OpenSSL?

qwerty6789

unread,
Aug 1, 2012, 7:21:24 PM8/1/12
to sage-s...@googlegroups.com, qwert...@chammy.info
But I get essentially the same error when I run make:


$ make
cd spkg && \
"../spkg/pipestatus" \
    "env SAGE_PARALLEL_SPKG_BUILD='' ./install all 2>&1" \
    "tee -a ../install.log"
Nothing to (re)build / all up-to-date.
./sage -b

------------------------------
----------------------------
sage: Building and installing modified Sage library files.

Installing c_lib

ERROR:root:code for hash md5 was not found.




Volker Braun

unread,
Aug 1, 2012, 7:33:28 PM8/1/12
to sage-s...@googlegroups.com, qwert...@chammy.info
You need to download the source archive. The binary build doesn't include the sources, so there is nothing to (re)build.

qwerty6789

unread,
Aug 1, 2012, 9:42:15 PM8/1/12
to sage-s...@googlegroups.com, qwert...@chammy.info
Duh. I could have poked around the filetree but was being lazy.

Already downloaded and built from source and it seems to be working so far.

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages