Mac 上首先要要安装 brew install mysql-connector-c. 修改 mysqlconfig 文件. Ld: library not found for -lssl. #externals - Opening PHP's #internals to the outside. Hi, I am compiling MariaDB 10.2.6 and PHP 7.1.6. I'm trying it on Debian 8.8 32x / x64 on DigitalOcean.
- Share:
- Please consider sharing 🙏
- Published At:
- Dec 11th, 2020
- Tags:
- #ruby, #rails, #mysql, #gem
- Next:
- Ruby's Shovel Method: Digging Deeper
- Previous:
- Webpacker 6: Tutorial Setup
I’ve come across this error several times throughout my development career so I figured it was finally time to write it down.
Scenario
Whenever I try to install certain versions of the mysql2
gem in a Ruby on Rails application, I get the following error:
Solution
In order to fix this issue on macOS, first make sure that you have cmake
installed.
Then you can install the gem via the following command:
Hope this helps save someone some time!
View All ArticlesI was trying to get a fresh Django 1.10 project setup on macOS Sierra using MySQL and Python 3.5 in a venv but pip install mysqlclient
was failing with the error:
Mac Library Not Found For Lssl
As is often the case after some searching I came into the solution on Stack Overflow. mysqlclient
needs to link against the homebrew version of openssl I have installed:
The solution post also mentions that installing the xcode command line tools via:
Ld Library Not Found For Lssl Mac Mysql Download
will provide the required ssl libs for the system installed version of python (2.7 on Sierra), it will not work for python in a virtual environment.