0

I hope there will be a warrior.

I'm deploying my rails project on AWS EC2.

System type: Cent OS

ERROR:

brew install mysql

I'm using linuxbrew to install mysql but it gives me make error

I installed rvm, rails, mysql(using yum not brew)... The disaster is from now...

rails db:migrate

require': libssl.so.10: cannot open shared object file: No such file or directory - /home/ec2-user/.rvm/gems/ruby-2.5.1/gems/mysql2-0.5.2/lib/mysql2/mysql2.so (LoadError)

I wasted 3 days for this error. Please help me...

shizhen
  • 12,251
  • 9
  • 52
  • 88
Crazy Pioneer
  • 33
  • 1
  • 10

2 Answers2

0

As mentioned by GKE, you need libssl packages. I think somehow your box is missing the symlink.

Try:

brew install openssl
brew link --force openssl

This should fix the problem. If it doesn't, you might have to create symlinks manually by:

cd /usr/lib64

sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10

Simillar question - LoadError - cannot open shared object file - file is present, but it says no such file

  • Thank you but when I run `sudo ln -s libssl.so.1.0.0 libssl.so.10` and it shows `ln: failed to create symbolic link ‘libssl.so.10’: File exists` In fact, I checked libssl.so.1.0.0 and libssl.so.10 from /usr/lib64 and I could see that libssl.so.10 exists but libssl.so.1.0.0 doesn't exist before. Could you help? – Crazy Pioneer Jan 25 '19 at 10:49
0

Finally, I found it. I can't sure exactly but when you install openssl using brew, the path is here:

/home/linuxbrew/.linuxbrew/lib/

So, I have to use this here

sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10

Thank you all!!!!!

GOOD DAY!!!!

raven-rock
  • 53
  • 5
Crazy Pioneer
  • 33
  • 1
  • 10