I've a problem installing sphinx with percona 5.6 on centos 6.4.
I'm getting the following error while building from source:
******************************************************************************
ERROR: cannot find MySQL include files.
Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.
If include files are installed on your system, but you are still getting
this message, you should do one of the following:
1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in
your PATH environment variable.
To disable MySQL support, use --without-mysql option.
******************************************************************************
Percona-Server-devel is installed:
rpm -qa | grep -i percona
percona-release-0.0-1.x86_64
Percona-Server-server-56-5.6.16-rel64.2.el6.x86_64
Percona-Server-client-56-5.6.16-rel64.2.el6.x86_64
Percona-Server-devel-56-5.6.16-rel64.2.el6.x86_64
Percona-Server-shared-56-5.6.16-rel64.2.el6.x86_64
What I've tried:
locate "libmysql"
/usr/lib64/libmysqlclient.so.18
/usr/lib64/libmysqlclient.so.18.0.0
/usr/lib64/libmysqlclient_r.so.18
/usr/lib64/libmysqlclient_r.so.18.0.0
/usr/lib64/mysql/libmysqlclient.so.16
/usr/lib64/mysql/libmysqlclient.so.16.0.0
/usr/lib64/mysql/libmysqlclient_r.so.16
/usr/lib64/mysql/libmysqlclient_r.so.16.0.0
/usr/lib64/mysql/libmysqlservices.a
than:
./configure --with-mysql=/usr/lib64/mysql --with-mysql-libs=/usr/lib64/mysql
./configure --with-mysql=/usr/lib64 --with-mysql-libs=/usr/lib64
./configure --with-mysql=/usr/bin/mysql --with-mysql-libs=/usr/bin/mysql
./configure --with-mysql=/usr
configure: error: invalid MySQL root directory '/usr/lib64/mysql';
neither bin/mysql_config, nor include/ and lib/ were found there
which mysql_config
/usr/bin/mysql_config
Have you tried installing mysql-devel ?
sudo yum install mysql-devel
If properly setup, try as suggested in the error message to point to these libs manually using a command like the following one (to be adapted to your environment)
./configure --with-mysql-includes=/usr/local/src/mysql-XXX/include
Related
I'm trying to install a tool (MyChem) using cmake on our Ubuntu EC2 instance, the tool I'm installing should utilize mysql so I installed it first. But when I tried to install the tool its says mysql atomic library is missing. What is atomic library? Anybody knows why or how to solve this?
I installed mysql first as follows:
$ sudo apt upgrade
$ sudo apt-get install build-essential
$ sudo apt-get install mysql-server mysql-client
$ sudo apt-get install libmysqlclient-dev
And the followings are the error messages:
$ cmake ..
-- The build type is RelWithDebInfo
-- Test module disabled
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Using mysql-config: /usr/bin/mysql_config
-- MySQL Version: 5.7.29
-- MySQL Plugin Dir: /usr/lib/mysql/plugin
-- Found MySQL 5.7.29: /usr/include/mysql, /usr/lib/x86_64-linux-gnu/libmysqlclient.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libm.so;/usr/lib/x86_64-linux-gnu/librt.so;MYSQL_LIBRARIES_atomic-NOTFOUND;/usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libdl.so
-- Mychem installation directory: /usr/lib/mysql/plugin
-- Defining dlhandler source files
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
MYSQL_LIBRARIES_atomic
linked by target "mychem-lib" in directory /home/ubuntu/mychem-1.0.0/src
linked by target "modification_test" in directory /home/ubuntu/mychem-1.0.0/tests
...
-- Configuring incomplete, errors occurred!
From above, around in the middle, you should be able to see the error messages such as MYSQL_LIBRARIES_atomic-NOTFOUND and also
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: MYSQL_LIBRARIES_atomic
at the bottom.
I'm trying to use Rails with the MySQL bin from Ampps, but when I run the command rails generate scaffold User name:string email:string I get the following error:
dyld: lazy symbol binding failed: Symbol not found: _mysql_server_init
Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
Expected in: flat namespace
dyld: Symbol not found: _mysql_server_init
Referenced from: /Users/myusername/.rvm/gems/ruby-2.2.1/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle
Expected in: flat namespace
I have already configured Ampps Mysql with my environment but I can not managed to make it work with rails, I have the following configurations.
$ which mysql
/Applications/AMPPS/mysql/bin/mysql
$ echo $PATH
/Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1#global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/gems/ruby-2.2.1/bin:/Users/myusername/.rvm/gems/ruby-2.2.1#global/bin:/Users/myusername/.rvm/rubies/ruby-2.2.1/bin:/Applications/AMPPS/php-5.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myusername/.rvm/bin:/Users/myusername/.rvm/bin:/Applications/AMPPS/mysql/bin
$ ls -l /usr/local/lib/libmy*.dylib
lrwxr-xr-x 1 myusername admin 53 Jan 1 19:30 /usr/local/lib/libmysqlclient.18.dylib -> /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib
I have tried doing commands but with no success:
$ gem install mysql2 -- --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
And
bundle config build.mysql2 --with-mysql-lib=/Applications/AMPPS/mysql/lib --with-mysql-include=/Applications/AMPPS/mysql/include --with-mysql-config=/Applications/AMPPS/mysql/bin/mysql_config
bundle install
Any ideas?
I downloaded this AMPPS package and did a quick check on the MySQL binary:
$ file /Volumes/AMPPS/AMPPS/mysql/bin/mysql
/Volumes/AMPPS/AMPPS/mysql/bin/mysql: Mach-O executable i386
Your 64-bit Ruby install is trying to link to 32-bit MySQL libraries, and is not finding what it's looking for. "Symbol not found" errors are often an indication of an architecture mismatch.
My advice to you would be to install these programs from a package management system such as MacPorts or Homebrew. I'm partial to MacPorts, so I'll give you instructions for that. I get the impression Homebrew is more popular, but haven't used it myself.
Install Xcode and the Xcode Command Line Tools
Agree to Xcode license in Terminal: sudo xcodebuild -license
Install MacPorts: https://distfiles.macports.org/MacPorts/MacPorts-2.3.4-10.11-ElCapitan.pkg
Update the port list: sudo port selfupdate
Install away: sudo port install mysql56 rb-rails rb-mysql
Update regularly: sudo port selfupdate && sudo port -uc upgrade outdated
This way you're getting properly built binaries for your system, you can easily keep them up to date, and you aren't filling your system up with 2 gigabytes of things you aren't necessarily going to use (5 different versions of PHP, a couple of database servers, Perl, Python, etc.) In addition, you also get up-to-date versions of other utilities like Ruby, rather than relying on the outdated version that ships with the operating system.
I seem to be having an issue getting MySQL 5.6.1.5 to install from Source. I am running RHEL 6.
I was able to perform the cmake, make, and make install without issues.
I am attempting to run the mysql_install_db binary and when I do I get the following error:
Fatal ERROR: Could not find ./bin/my_print_defaults
If you compiled from source, you need to run 'make install' to copy the software
into the correct location ready for operation.
If you are using a binary release, you must either bat at the top level of the
extracted archive, or pass the --basedir option pointing to that location.
So I did a check for my_print_defaults using which my_print_defaults, unfortunately it was not found on my machine.
I did a locate my_print_defaults as well just for the heck of it and said it was located in /usr/bin/my_print_defaults, however, when I checked /usr/bin for the binary, it was not actually there.
I would try to use mysql_install_db --basedir=/usr/bin but I know this won't work as the which and locate commands confirm my_print_defaults isn't on my machine.
I looked at mysql_install_db giving error, but that error was not similar to this one.
Please ignore question, I didn't bother to try running find / -name my_print_defaults and found it in /usr/local/mysql/bin/
I searched packages for my_print_defaults with
apt-file search my_print_defaults
If my_print_defaults is missing on your system (which my_print_defaults), first find out which db is installed with:
dpkg -l |grep -E 'maria|mysql'|grep ii|grep server
If you have installed mariadb, try reinstall mariadb:
sudo apt install --reinstall mariadb-server-core-10.1
If you don't find a solution with mariadb, swap back to mysql with
sudo apt install mysql-server
I'm trying to install MySQL 5.6 on Debian.
Here what I do:
sudo dpkg -i mysql-5.6.12-debian6.0-i686.deb
cd /usr/local
ln -s /opt/mysql/server-5.6 mysql
cd mysql
scripts/mysql_install_db.sh --user=mysql --datadir=/var/lib/mysql
And this is the error that I get:
FATAL ERROR: Could not find #bindir#/my_print_defaults
If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.
If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.
Could you please suggest something? I'm installing MySQL from scratch (previous version was completely removed).
Thanks.
I might not be able to help with the error you're getting. But apt-get install -f mysql-server-5.5 worked for me on Debian Wheezy. Try replacing 5.5 with 5.6 and see if it works as well, and probably precede it with sudo.
I want to gem install do_mysql, it fails because the MySQL header files can not be found.
do_mysql.c:5:19: error: mysql.h: No such file or directory
do_mysql.c:6:20: error: errmsg.h: No such file or directory
do_mysql.c:7:26: error: mysqld_error.h: No such file or directory"
My system adminstrator install mysql as a package, so basically the "/usr/local/mysql" do not exist at all!!
So what should I do?
by querying the package
rpm -q --filesbypkg mysql-5.5.19-1.el6.remi.x86_64
mysql /usr/bin/msql2mysql
mysql /usr/bin/mysql
mysql /usr/bin/mysql_config
mysql /usr/bin/mysql_find_rows
mysql /usr/bin/mysql_waitpid
mysql /usr/bin/mysqlaccess
mysql /usr/bin/mysqladmin
[...]
You have to install the "developer package" of MySQL on your distribution which contains the required header files (your error message contains pointers at mysql.h).
On RHEL 6 or compatible distribution you can just install the package mysql-devel.