-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix with --with-mysql-dir or --with-mysql-lib or --with-mysql-include #1118
Comments
Hello, Managed to install without passing any options. Regards, |
Thanks for opening a new issue. And, in fact have you resolved the problem? Can the issue be closed at this time, or is there some improvement you'd like to see in the msyql2 gem or documentation? (open-and-shut tickets like these are actually very helpful for the next person who has a similar problem to find the resolution, thank you very much for posting your follow-up message!) |
Hi, Thank you for answering me so quiclky twice. As a result there's two distinct things going on here and I'm not sure if we can close the ticket.
I give you that it's a very twisted case as everything works fine out of the box with all the right dependencies installed (i.e.: including MariaDB-shared). And maybe point 2 happends only in this twisted situation. Anyway, as far as I'm concern all is good, redmine is installed up and running. Thank you again and glad if this can help anyone in the future. Regards, |
I am getting the same error. I can compile the gem by passing the
But then the gem throws an error when I try to use it:
In my case the server has an old version of MySQL running that we cannot remove because it is used by other apps. We installed the MySQL client libraries for a newer version of MySQL so that we can connect to another database server and compiled against this newer libraries but the mysql2 gem throws the "undefined symbol: mysql_server_init" when it is loaded. For what is worth, this is with Ruby 2.7.1 and Red Hat 6
|
Our sys admin was able to workaround this issue by using both the Make sure the "devel" package is installed on the server, otherwise it won't find the include files that it needs to build the gem.
I believe the symbol |
Hi there,
As per @sodabrew recommendation I'm opening a new issue.
I'm facing some error as in issue #952 with mysql2-0.5.3 when trying to install Redmine on CentOS 8.
I first installed it using
$ gem install mysql2 -- --with-mysql-dir=/usr
Then uninstalled the gem and tried to set some options in the bundle config
$ bundle config set build.mysql2 --with-mysql-lib=/usr/lib64/mysql --with-mysql-include=/usr/include/mysql
$ bundle install
In both cases the installation of mysql2 went well but then this error occur
$ bundle exec rake generate_secret_token ruby /home/redmine/.rvm/gems/ruby-2.6.5/bin/rake generate_secret_token: symbol lookup error: /home/redmine/.rvm/gems/ruby-2.6.5/gems/mysql2-0.5.3/lib/mysql2/mysql2.so: undefined symbol: mysql_server_init
$ bundle exec rake db:migrate RAILS_ENV=production ruby /home/redmine/.rvm/gems/ruby-2.6.5/bin/rake db:migrate RAILS_ENV=production: symbol lookup error: /home/redmine/.rvm/gems/ruby-2.6.5/gems/mysql2-0.5.3/lib/mysql2/mysql2.so: undefined symbol: mysql_server_init
If I follow the link above it seems to say that the fix has been merged since 0.5.2 but I have 0.5.3.
Please note that I'm using MariaDB server installed with their repository.
$ ldd /home/redmine/.rvm/gems/ruby-2.6.5/gems/mysql2-0.5.3/lib/mysql2/mysql2.so
linux-vdso.so.1 (0x00007ffd48794000)
libruby.so.2.6 => /home/redmine/.rvm/rubies/ruby-2.6.5/lib/libruby.so.2.6 (0x00007fbb55af5000)
libm.so.6 => /lib64/libm.so.6 (0x00007fbb55773000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbb553b0000)
libz.so.1 => /lib64/libz.so.1 (0x00007fbb55199000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbb54f79000)
librt.so.1 => /lib64/librt.so.1 (0x00007fbb54d70000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fbb54b6c000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fbb54943000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbb56266000)
@sodabrew said:
I don't understand neither but if i try a regular "bundle install" or "gem install" it does not work.
Regards,
The text was updated successfully, but these errors were encountered: