When we try to install percona MySQL using binary installation we are getting error as follows:
./mysql_install_db: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
[mysql#unvacp004 bin]$ ./mysql_install_db --basedir=/fs0/mysql/product/5.7.20/bin --defaults-file=/fs0/mysql/instance/dddd/conf/my.cnf --ledir=/fs0/mysql/product/5.7.20/bin/ --user=mysql
Have you tried the solution here?
https://bugs.launchpad.net/percona-server/+bug/1453395
It seems there are different tarballs which have different SSL library dependencies.
You probably use the wrong one.
Also make sure you have the libssl1.0.0 libssl-dev packages installed. This is for Ubuntu, for RHEL systems the packages might be called differently.
Related
I upgraded a working Rails app from Mysql 5.7 to 8.0 on my dev machine but it fails to work on a staging/test server setup with the exact same directory structure and env vars.
I'm getting an error "file not found" for /apps/bundle/ruby/2.7.0/gems/mysql2-0.5.4/lib/mysql2/mysql2.so
ldd /apps/bundle/ruby/2.7.0/gems/mysql2-0.5.4/lib/mysql2/mysql2.so shows a file not found (mysql.so.20) (? - I'm not at work so the filenames might be off) that definitely existed and was part of Mysql 5.7.
So the overall question is how to force the mysql2 gem install to relink to the correct new .so files?
There are a lot of moving parts to this, making things a mystery:
installing mysql from a source tarball,
installing in non-standard directories (apps/usr/local/stow/mysql-8.0.16),
using GNU stow to link mysql .so files from the install directory apps/usr/local/stow/mysql-8.0.16 into a common /apps/usr/local/lib directory (the env var LD_LIBRARY_PATH=/apps/usr/local/lib),
vendoring the gems in the bundle on my dev machine using the bundle package --all command so they're part of the git repo.
I've blown away the /apps/bundle directory contents and rerun bundle install thinking that would force a proper linkage of the .so files without success.
Any ideas? TIA!
Recently I updated my MacOS to Monterey 12.3 which included updates for xcode.
After that I am not able to run the rails application that I have been working on. I keep getting this error when I try to spin up the server.
I have tried installing and removing mysql different ways. Both using a brew install and DMG file from mysql website.
I am able to access the database instance through my command line but I think they issue is that it I can't connect from application. Anyone else having similar issues?
here is the full error
/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in `require': dlopen(/Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: libssl.1.1.dylib (LoadError)
Referenced from: /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
Reason: tried: 'libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file), '/Users/gus/gus_project/Gus2021/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file) - /Users/gus/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle
If anyone runs into this problem, this is what solved my issue.
paths to openssl needed to be updated.
gem install mysql2 -- --with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib --with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
bundle install
Obviously this is for openssl install with brew install version 1.1
I was able to get it working with this:
brew install openssl
bundle config build.mysql2 --
--with-ldflags=-L/opt/homebrew/opt/openssl#1.1/lib
--with-cppflags=-I/opt/homebrew/opt/openssl#1.1/include
brew install openssl#1.1
Do all the export path things, and make sure to link openssl#1.1
brew link openssl#1.1 --force
I had similar issue with postgresql, which raises error while running psql -d database:
Library not loaded: '/opt/homebrew/opt/openssl#1.1/lib/libssl.1.1.dylib'
In my case which I have openssl#3 and openssl# the solution is:
brew install openssl#1.1
brew link openssl#1.1 --force
Then reinstall postgresql with homebrew.
I also had my zshrc exporting the following ENV variable though I'm not quite sure if it's related:
export PATH="/opt/homebrew/opt/openssl#1.1/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#1.1/lib/pkgconfig"
For someone who runs into the same issue as mine!
I have a problem with Qt connecting with MySql, when i run this code
QSqlDatabase DBObject = QSqlDatabase::addDatabase("QMYSQL");
DBObject.setHostName("localhost");
DBObject.setDatabaseName("SingleDB");
DBObject.setUserName("root");
DBObject.setPassword("abc123");
bool ok = DBObject.open();
and I got this... QSqlDatabase: QMYSQL driver not loaded
I Have already done this also:
sudo apt-get install libmysqlclient
and
/home/wrm/Qt/5.12.3/gcc_64/bin/qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
and here i have this error: Project ERROR: Library 'mysql' is not defined
Any idea?
Perhaps you need to install mysql-devel.
According to the Qt Docs QMYSQL for MySQL 4 and higher:
How to Build the QMYSQL Plugin on Unix and macOS
You need the MySQL header files, as well as the shared library libmysqlclient.so. Depending on your Linux distribution, you may need to install a package which is usually called "mysql-devel".
Google doesn't have a readily available answer, so answering this old question:
Aside from needing development files as pointed above (like apt install libmysqlclient-dev), you need to generate a config:
# Just for making my snippet work. Feel free to hardcode paths.
export QTDIR=/home/you/Qt/
export QTVERSION=5.9.5
cd $QTDIR/$QTVERSION/Src/qtbase/src/plugins/sqldrivers
$QTDIR/$QTVERSION/gcc_64/bin/qmake sqldrivers.pro
cd mysql
make
make install # if you want; it installs it in the bin dir of $QTVERSION
In the past, this was not necessary for Qt 5.5 (where I did this last time).
On a side note, there is no longer a special thread-safe version of libmysqlclient (libmysqlclient_r). It's just one one. Last time I ran into that link error, I just edited the generate Makefile to use the non-_r.
I am trying to install a software which required MySQL-server, MySQL-client installed on the server so now I want to install MySQL-server and MySQL-client using rpm files "MySQL-server-5.5.17-1.rhel5.x86_64.rpm" and "MySQL-client-5.5.17-1.rhel5.x86_64.rpm".
I have installed MySQL-client but when I try to run mysql-server
*rpm -i MySQL-server-5.5.17-1.rhel5.x86_64.rpm*
it's showing error:
*error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
So how can i solve this problem?
the error given by you *error: Failed dependencies:
MySQL conflict with mysql-5.0.77-4.el5_6.6.x86_64
MySQL conflict with mysql-5.0.77-4.el5_6.6.i386
MySQL conflict with mysql-server-5.0.77-4.el5_6.6.x86_64*
It clear show that the machine you are going to install mysql 5.5 rpm have mysql 5.0.77 installed .
to resolve this problem .
1. you take backup of datadir and my.cnf (if you are using mysql 5.0 db server earlier).
2. remove all mysql 5.0 server packages , to remove these package you should knew what are the packages already installed on machine
to view all mysql package already installed use rpm -qa | grep -i "mysql*" this command show what package is already installed on machine
now you have to remove all package which name shows in above command.
to remove a package/rpm use rpm -e mysql-5.0.** if show error then use
rpm -e --nodeps mysql-5.0.**
we have to remove all packages one by one by using rpm -e .
after successful remove all older version of mysql , now start installation of mysql-5.5*** packages by using rpm -ivh mysql-5.5***.rpm.
First question - is the version of MySQL already installed actually in use or was it simply there as a result of a fresh CentOS install? If the former, try upgrading rather than installing. If the latter, uninstall the old version (possibly using the --no-deps option on rpm) and then install the newer version
Next, are you trying to replace MySQL or install another version alongside it?
If the former, again try upgrading rather than installing. If that's not possible, you're going to have to remove the older version and then install the new version
If the latter, and if it is possible, look at the --prefix and --relocate options in RPM.as they may help.
If you do to mange to get it installed side by side with an older, you'll have fun and games ensuring that the relevant versions are pointing to the correct libraries and that you don't get any corruption between them. Also, you will need to run them so that they listen on separate ports with separate database folders, PID and socket files etc.
Whatever you need to do, do it out of business hours with as many backups as you can do
After installing from the RPM and then trying the Binary versions of APE (AJAX Push Engine) I am getting this error (on both versions) when I try to run the APE server:
[Module] Failed to load ../modules/libmod_spidermonkey.so [Invalid library] (libmysqlclient_r.so.15: cannot open shared object file: No such file or directory)
I am using Fedora Linux, with MySql and apache installed. How can I get this libmysqlclient file? I have found this RPM: http://rpm.pbone.net/index.php3/stat/4/idpl/12471829/dir/fedora_4/com/mysqlclient15-5.0.67-1.fc4.remi.i386.rpm.html
And it says it includes this file, so I downloaded it to the box, attempted to install and tells me that it's already installed.
Any advice would help thanks!
Inside the ape.conf there's a module working directory which must be altered.