Bus error on Composer install
I installed php 7.4 on Alpine Linux versions 3.20 and 3.19. Php works fine but there is problem with Composer. When I tried to install Composer itself it gave me error “Bus error”. Tried to debug Composer installer file and found that Bus error message is thrown by this function call openssl_x509_parse($contents)
If you disable TLS with –disable-tls flag then composer installs just fine
But problems is not solved. When you try to install Composer package you are greeted with another error. This time error is Segmentation fault.
What is interesting that on same Alpine linux 3.20 with php 8 everything works fine. So I came to conclusion that php 7.4 openssl is not working properly with OpenSSL version 3.3.2. And that is why Composer is throwing Bus error and Segmentation fault errors.
So what is a solution? Install Alpine linux 3.16. There is Openssl version 1.1.1 and php 7.4 Composer works just fine
Or disable TLS for composer