"code for hash md5 was not found" after fresh Sage 5.0 install on fresh Ubuntu 12.04 install
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 ...
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.
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.
I'll note that all of these seem to have a Sage for an older version of Ubuntu running on a newer version...
Read Volker's answer.