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.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
user1499220
  • 419
  • 4
  • 12
  • 23

2 Answers2

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.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • i have the same problem, and i didn't found any solution. how to fix this error????? – Max L Feb 21 '13 at 23:59
  • Install your distros *openssl-dev* package before running the plone install.sh. – gps Apr 01 '13 at 15:21
  • 1
    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? – starflyer Oct 30 '13 at 22:41
  • 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. – andy Dec 05 '14 at 11:40
  • 1
    @andy: `ldd` wouldn't work on Windows or Mac though. And it depends on your Linux distribution how you'd correct those dependencies. – Martijn Pieters Dec 05 '14 at 11:41
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 openssl@1.1
   brew install libressl
   brew uninstall python2
   brew install python2
  • `brew upgrade libressl` worked for me, so this `python -c "import hashlib;"` doesn't throw any errors about missing md5, sha512, etc. – Jason Moore Jan 27 '20 at 20:53