unsupported hash type when installing plone
Asked Answered
S

2

4

I tried to install plone but I have a problem when I run the script install.sh. Here are the errors details:

raise ValueError('unsupported hash type %s' % name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found
ValueError: unsupported hash type sha512

I read in a forum that this error may be caused by a version of Plone which is not compatible with the python version that is on the OS. But, here is what is said on the official website of plone:

The Plone Unified Installer is a source-installation kit that installs Plone and its dependencies from source on most Unix-like platforms. The kit includes Plone, Zope and Python. Python is installed in a way that will not change or interfere with your system Python.

So I don't know how to solve the problem.

Sanbenito answered 11/7, 2012 at 12:53 Comment(0)
S
9

This is not a Plone-only problem.

Python uses OpenSSL for the hashlib module, and the OpenSSL libraries on your system do not provide functions that it needs. Normally the sha256, sha384 and sha512 algorithms are supposed to be present by default but they are not on your system, and/or python is being linked to the wrong system libraries.

How to solve this depends on your OS, for which you didn't provide any details. You could check the list of requirements for the installer and doublecheck you have everything you need.

Scissure answered 11/7, 2012 at 13:46 Comment(5)
i have the same problem, and i didn't found any solution. how to fix this error?????Gebhardt
Install your distros openssl-dev package before running the plone install.sh.Raddatz
What's needed here? The lib files or the header files or both? And how do I determine what file Python is looking for exactly?Nobles
learn from another SO answers: ldd /path/to/your/pythonlib/lib-dynload/_hashlib.so, and you will see that some .so files like libssl and libcrypto are lost.Unmanned
@andy: ldd wouldn't work on Windows or Mac though. And it depends on your Linux distribution how you'd correct those dependencies.Scissure
S
2

As @Martijn has explained, openssl does not have the required hash functions. So, uninstalled it and use other library, for instance libressl. I did the following and it worked on Mac El Capitan:

   brew uninstall [email protected]
   brew install libressl
   brew uninstall python2
   brew install python2
Stylish answered 25/5, 2018 at 21:0 Comment(1)
brew upgrade libressl worked for me, so this python -c "import hashlib;" doesn't throw any errors about missing md5, sha512, etc.Overturn

© 2022 - 2024 — McMap. All rights reserved.