Ask Your Question
2

"code for hash md5 was not found" after fresh Sage 5.0 install on fresh Ubuntu 12.04 install

asked 2012-05-20 18:40:17 +0100

Peter gravatar image

updated 2015-01-13 20:44:27 +0100

FrédéricC gravatar image

I had Sage 4.8 running fine on Ubuntu 11.10. I did a new installation of Ubuntu 12.04 in a new partition, downloaded Sage 5.0 64-bit, verified the MD5 sum and unpacked, and ran ./sage. After the paths were reset, I got a slew of messages about "code for hash <x> not found". (The first message was about md5, but as you can see below, there were many others that failed.) I deleted the Sage directory in /home and redid the Sage download and install, with the same result. In hashlib.py where the code issues the message, there is the note "some may not work due to the OpenSSL version not supporting that algorithm." I do have the latest level of the openssl and python-openssl packages that are available on the Ubuntu repositories, and it appears that the code is trying all the standard ones, nothing exotic. Any ideas?

peterhu@peterhu-ThinkPad-T420:~/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux$ ./sage
----------------------------------------------------------------------
| Sage Version 5.0, Release Date: 2012-05-14                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
The Sage installation tree may have moved
(from /scratch/buildbot/sage/redhawk-1/redhawk_binary/build/sage-5.0 to /home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux).

Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done resetting paths.

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)

ValueError: unsupported hash type md5

ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1

ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224

ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/peterhu/math/tools/sage-5.0-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256

ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File ...
(more)
edit retag flag offensive close merge delete

Comments

Same problem here. I managed to compile Sage from source, but its notebook has at least one problem: it can't typeset TeX-code in the worksheet. Today I tried to run Sage from the precompiles binary. I reasoned that any missing libraries on my system surely would have been installed when I compiled the source code, but that was not the case. So I now have two copies of Sage 5.0. One of them runs fine (as far as I can see) except for one (or more?) features in the notebook(). The other one won't even start because of 'unsupported hashes'. I have Ubuntu 10.04 LTS, 32 bits.

Dirk Danckaert gravatar imageDirk Danckaert ( 2012-06-08 16:20:52 +0100 )edit

Same problem here. I generated a fresh VM with 12.04lts, downloaded the most recent version I could find sage-5.0.1-linux-64bit-ubuntu_10.04.3_lts-x86_64-Linux.tar.lzma, unpacked it in /usr/src and when I ran .sage it did exactly as you noted. I guess I am 3 for 3: 3 installs of sage over the last 5 years and 3 adventures in computing... none of them installed without extreme measures and lots of help.

amon gravatar imageamon ( 2012-06-13 21:38:02 +0100 )edit

I'll note that all of these seem to have a Sage for an older version of Ubuntu running on a newer version...

kcrisman gravatar imagekcrisman ( 2012-06-20 17:08:55 +0100 )edit

Read Volker's answer.

benjaminfjones gravatar imagebenjaminfjones ( 2012-09-02 00:59:05 +0100 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2012-06-20 14:46:13 +0100

MaelstromYamato gravatar image

updated 2012-06-20 14:48:25 +0100

Try installing libssl0.9.8. e.g.:

sudo apt-get install libssl0.9.8

I got a similar error before installing the library above:

----------------------------------------------------------------------
| Sage Version 5.0.1, Release Date: 2012-06-10                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
The Sage installation tree may have moved
(from /scratch/buildbot/sage/redhawk-1/redhawk_binary/build/sage-5.0.1 to /home/clinton/sage).
Changing various hardcoded paths...
(Please wait at most a few minutes.)
DO NOT INTERRUPT THIS.
Done resetting paths.
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 139, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/home/clinton/sage/local/lib/python/hashlib.py", line 91, in __get_builtin_constructor
    raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "/home/clinton/sage/local/bin/sage-ipython", line 18, in <module>
    import IPython
  File "/home/clinton/sage/local/lib/python2.7/site-packages/IPython/__init__.py", line 58, in <module>
    __import__(name,glob,loc,[])
  File "/home/clinton/sage/local/lib/python2.7/site-packages/IPython/ipstruct.py", line 17, in <module>
    from IPython.genutils import list2dict2
  File "/home/clinton/sage/local/lib/python2.7/site-packages/IPython/genutils.py", line 53, in <module>
    from IPython.external.path import path
  File "/home/clinton/sage ...
(more)
edit flag offensive delete link more

Comments

+1 for libssl0.9.8 I had exactly this problem with the pre-compiled 64-bit version (5.0.1) on Mint 13. Installing that package fixed it. I'm very happy I don't have to compile from source. thanks!

Matt_Patey gravatar imageMatt_Patey ( 2012-06-22 15:41:27 +0100 )edit
1

answered 2012-06-21 09:21:31 +0100

Volker Braun gravatar image

I successfully compiled Sage-5.0.1 on Ubuntu 12.04 64-bit. The key is to install the following packages

sudo apt-get install m4 g++ gfortran libssl-dev dh-exec
edit flag offensive delete link more

Comments

Volker, are these all listed in the installation guide?

kcrisman gravatar imagekcrisman ( 2012-06-21 12:10:49 +0100 )edit

Unfortunately not. Really there should be more checking in prereq.spkg, I think.

Volker Braun gravatar imageVolker Braun ( 2012-06-21 13:26:13 +0100 )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

Stats

Asked: 2012-05-20 18:40:17 +0100

Seen: 8,090 times

Last updated: Jun 22 '12