I'm trying to compile mysql 5.1.60 on ubuntu oneiric. I'm not sure why its not compiling properly. I get this error using the bundled libedit/libreadline. Ive tried using the system libraries and I get errors with that as well.
EDIT: Tried compiling other versions of mysql and I get the same thing. I'm guessing its a change in oneiric ubuntu?
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_deletechars':
terminal.c:(.text+0x755): undefined reference to `tgoto'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_set':
terminal.c:(.text+0x1033): undefined reference to `tgetent'
terminal.c:(.text+0x104f): undefined reference to `tgetflag'
terminal.c:(.text+0x1064): undefined reference to `tgetflag'
terminal.c:(.text+0x1079): undefined reference to `tgetflag'
terminal.c:(.text+0x108e): undefined reference to `tgetflag'
terminal.c:(.text+0x10a3): undefined reference to `tgetflag'
../cmd-line-utils/libedit/libedit.a(terminal.o):terminal.c:(.text+0x10b8): more undefined references to `tgetflag' follow
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_set':
terminal.c:(.text+0x10cd): undefined reference to `tgetnum'
terminal.c:(.text+0x10e2): undefined reference to `tgetnum'
terminal.c:(.text+0x110c): undefined reference to `tgetstr'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_insertwrite':
terminal.c:(.text+0x18cf): undefined reference to `tgoto'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_move_to_char':
terminal.c:(.text+0x1b65): undefined reference to `tgoto'
terminal.c:(.text+0x1b80): undefined reference to `tgoto'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_move_to_line':
terminal.c:(.text+0x1cd5): undefined reference to `tgoto'
terminal.c:(.text+0x1d14): undefined reference to `tgoto'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_echotc':
terminal.c:(.text+0x288b): undefined reference to `tgetstr'
terminal.c:(.text+0x29a7): undefined reference to `tgoto'
terminal.c:(.text+0x29ca): undefined reference to `tgoto'
../cmd-line-utils/libedit/libedit.a(terminal.o): In function `terminal_tputs.isra.1':
terminal.c:(.text+0x535): undefined reference to `tputs'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/root/mysql-5.1.60/client'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/mysql-5.1.60/client'
make: *** [all-recursive] Error 1
Why are you compiling MySQL 5.1 for Oneiric, if packages are available?
$ apt-cache search mysql 5.1
[...]
mysql-client-5.1 - MySQL database client binaries
mysql-client-core-5.1 - MySQL database core client binaries
mysql-server-5.1 - MySQL database server binaries and system database setup
mysql-server-core-5.1 - MySQL database server binaries
[...]
If you really do want to compile it, I'd suggest looking at the build scripts for those packages (you can find them by doing apt-get source mysql-5.1, and looking in debian/rules and the rest of the debian/ subdirectory)
cmake add this will work
-DCURSES_LIBRARY=/usr/local/ncurses/5.9/lib/libncurses.a \
-DCURSES_INCLUDE_PATH=/usr/local/ncurses/5.9/include
Related
I got this error when installing MoonMail follow the default instructions. It's seem that the installation guide is out of date. Do you have any ideas how to solve this problem?
Serverless: WARNING: This variable is not defined: sendCampaignTopicARN
Serverless: WARNING: This variable is not defined: sendEmailsTopicARN
Serverless: WARNING: This variable is not defined: sentEmailsTopicARN
Serverless: WARNING: This variable is not defined: projectBucket
/Users/michael/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:61
fn = function () { throw arg; };
^
ServerlessError: ServerlessError: An error occurred while provisioning your cloudformation: The following resource(s) failed to create: [AttachSenderTopic, PrecompileCampaignTopic, SentEmailsTable, SendCampaignTopic, PrecompileEmailTopic, AttachRecipientsTopic, ClicksStream, SentEmailsTopic, CampaignsTable, TemplatesTable, FreeUsersSendEmailQueue, UsersTable, IamRoleLambda, AttachListRecipientsTopic, StaticDataBucket, UnsubscribedRecipientTopic, LinksTable, UpdateListImportStatusTopic, EmailAdminsTopic, ListsTable, EmailNotificationsTopic, AttachRecipientsCountTopic, OpensStream, UpdateCampaignTopic, SendEmailsTopic, RecipientsImportS3Bucket, ReportsTable].
In order to deploy the project, you've got to define all those variables in the appropriate s-variables-*.json file. Besides, the issue could be somewhere else. I suggest you to go to the CloudFormation web console and check the events history for the MoonMail stack, it provides more information and better understanding about why it errored than the serverless CLI.
I am trying to build caffe using Atlas, CUDA and cuDNN on Fedora 22 and I'm getting this error.
Linking CXX shared library ../../lib/libcaffe.so
[ 86%] Built target caffe
Linking CXX executable caffe
../lib/libcaffe.so: undefined reference to `cblas_sgemv'
../lib/libcaffe.so: undefined reference to `cblas_dgemm'
../lib/libcaffe.so: undefined reference to `cblas_sscal'
../lib/libcaffe.so: undefined reference to `cblas_dgemv'
../lib/libcaffe.so: undefined reference to `cblas_saxpy'
../lib/libcaffe.so: undefined reference to `cblas_ddot'
../lib/libcaffe.so: undefined reference to `cblas_dasum'
../lib/libcaffe.so: undefined reference to `cblas_sgemm'
../lib/libcaffe.so: undefined reference to `cblas_dscal'
../lib/libcaffe.so: undefined reference to `cblas_scopy'
../lib/libcaffe.so: undefined reference to `cblas_sasum'
../lib/libcaffe.so: undefined reference to `cblas_daxpy'
../lib/libcaffe.so: undefined reference to `cblas_dcopy'
../lib/libcaffe.so: undefined reference to `cblas_sdot'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:109: recipe for target 'tools/caffe' failed
make[2]: *** [tools/caffe] Error 1
CMakeFiles/Makefile2:373: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: *** [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
The fix mentioned here is to add opencv_imgcodecs to the list of libraries but I'm still getting the same error.
Is this problem related to Atlas or is the fix in the Makefile? I had to edit FindAtlas.cmake earlier to get it to find the libraries on my system.
I am trying to run the MIT project CryptoDB. I have downloaded it and I have followed the instructions to compile as it is explained in the included instructions, for mysql-proxy and mysql version 5.5.14. I am using a RedHat Enterprise 6 server.
When I get to the point of running the make command i get this error:
Building CXX object sql/CMakeFiles/sql.dir/sql_lex.cc.o
In file included from /soft/mysql-5.5.14/build/sql/lex_hash.h:25,
from /soft/mysql-5.5.14/sql/sql_lex.cc:113:
/soft/mysql-5.5.14/sql/lex.h:193: error: ‘ENC_SYM’ was not declared in this scope
/soft/mysql-5.5.14/sql/lex.h:623: error: too many initializers for ‘SYMBOL’
make[2]: *** [sql/CMakeFiles/sql.dir/sql_lex.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2
I am quite lost as I cannot find if there is a missing library or any kind of incompatbility on what I am using. Any ideas?
Even i have not finished installation now I now that the problem comes from not having the last version of the code. By getting it with the following command:
git clone -b public git://g.csail.mit.edu/cryptdb
I get to execute an instalation script in ruby that performs the work.
The script is not writen especifically for Redhat, so I am having some work adapting some commands (apt-get => yum).
I have a Rails 3.2.13 app that I would like deployed, but the hosting service would require MySQL, as opposed to sqlite which I have been using.
In the process of converting from sqlite to MySQL, I had to install the ruby gem mysql2, which is giving me the following error upon installing:
Error installing mysql2: ERROR: Failed to build gem native extension.
I've tried both bundle install, as well as gem install mysql2, but the same error message appeared.
I am aware that the solution that has worked for many is sudo apt-get install libmysql-ruby libmysqlclient-dev, but I'm using Git Bash on Windows, so I found a Windows equivalent (#francois's answer on this question). I installed MySQL Server 5.6 with the installer, and ran the following command:
gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.6\include"'
From what I have read, this is supposed to successfully install the 'mysql2' ruby gem. But strangely enough, I still had the following error:
Temporarily enhancing PATH to include DevKit... Building native extensions with: '--with-mysql-lib="c:\Program
Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="c:\Program
Files\MySQL\MySQL Server 5.6\i nclude"' This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-mysql-lib="c:\Pro gram Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="c:\Program Files\My SQL\MySQL Server 5.6\include" checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes
checking for rb_intern3()... yes checking for main() in -llibmysql...
yes checking for mysql.h... yes checking for errmsg.h... yes checking
for mysqld_error.h... yes creating Makefile
make generating mysql2-i386-mingw32.def compiling client.c client.c: In function 'rb_raise_mysql2_error': client.c:139:3:
warning: ISO C90 forbids mixed declarations and code client.c: In
function 'finish_and_mark_inactive': client.c:508:3: warning: ISO C90
forbids mixed declarations and code client.c: In function
'rb_mysql_client_abandon_results': client.c:535:3: warning: ISO C90
forbids mixed declarations and code client.c: In function
'rb_mysql_client_next_result': client.c:938:5: warning: ISO C90
forbids mixed declarations and code compiling mysql2_ext.c compiling
result.c result.c: In function 'rb_mysql_result_fetch_fields':
result.c:407:35: warning: comparison between signed and unsigned
integer express ions linking shared-object mysql2/mysql2.so client.o:
In function nogvl_connect':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:158: undefined reference tomysql_real_connect#32' client.o:
In function nogvl_init':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:150: undefined reference tomysql_init#4' client.o: In
function set_ssl_options':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:1078: undefined reference tomysql_ssl_set#24' client.o: In
function mysql_client_options':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:723: undefined reference tomysql_options#12'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:727: undefined reference to mysql_error#4' client.o: In
functionrb_mysql_info':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:267: undefined reference to mysql_info#4' client.o: In
functionrb_mysql_client_warning_count':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:257: undefined reference to mysql_warning_count#4' client.o:
In functionnogvl_do_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:370: undefined reference to mysql_store_result#4' client.o: In
functionrb_mysql_client_more_results':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:923: undefined reference to mysql_more_results#4' client.o: In
functionnogvl_select_db':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:863: undefined reference to mysql_select_db#8' client.o: In
functionnogvl_ping':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:894: undefined reference to mysql_ping#4' client.o: In
functionrb_mysql_client_thread_id':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:856: undefined reference to mysql_thread_id#4' client.o: In
functionrb_mysql_client_last_id':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:825: undefined reference to mysql_insert_id#4' client.o: In
functionnogvl_read_query_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:357: undefined reference to mysql_read_query_result#4'
client.o: In functionrb_mysql_client_server_info':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:788: undefined reference to mysql_get_server_version#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:789: undefined reference tomysql_get_server_info#4' client.o:
In function rb_mysql_client_info':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:756: undefined reference tomysql_get_client_version#0'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:757: undefined reference to mysql_get_client_info#0' client.o:
In functionrb_mysql_client_real_escape':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:662: undefined reference to mysql_real_escape_string#16'
client.o: In functionfinish_and_mark_inactive':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:515: undefined reference to mysql_free_result#4' client.o: In
functionnogvl_send_query':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:334: undefined reference to mysql_send_query#12' client.o: In
functionnogvl_close':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:190: undefined reference to mysql_close#4' client.o: In
functionrb_mysql_client_escape':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:238: undefined reference to mysql_escape_string#12' client.o:
In functionrb_raise_mysql2_error':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:125: undefined reference to mysql_error#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:126: undefined reference tomysql_sqlstate#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:140: undefined reference to mysql_errno#4' client.o: In
functionrb_connect':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:297: undefined reference to mysql_errno#4' client.o: In
functionrb_mysql_client_store_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:966: undefined reference to mysql_errno#4' client.o: In
functionrb_mysql_client_next_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:939: undefined reference to mysql_next_result#4' client.o: In
functionrb_mysql_client_affected_rows':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:839: undefined reference to mysql_affected_rows#4' client.o:
In functionrb_mysql_client_async_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:419: undefined reference to mysql_errno#4' client.o: In
functionrb_mysql_client_abandon_results':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:539: undefined reference to mysql_next_result#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:538: undefined reference tomysql_more_results#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:547: undefined reference to mysql_free_result#4' client.o: In
functionnogvl_do_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:368: undefined reference to mysql_use_result#4' client.o: In
functionnogvl_close':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:190: undefined reference to mysql_close#4' client.o: In
functionset_charset_name':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:1067: undefined reference to mysql_options#12'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:1069: undefined reference tomysql_error#4' client.o: In
function init_mysql2_client':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/cl
ient.c:1105: undefined reference tomysql_get_client_info#0'
result.o: In function rb_mysql_result_count':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:576: undefined reference tomysql_num_rows#4' result.o: In
function rb_mysql_result_fetch_field':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:126: undefined reference tomysql_fetch_field_direct#8'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:114: undefined reference to mysql_num_fields#4' result.o: In
functionrb_mysql_result_fetch_fields':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:403: undefined reference to mysql_num_fields#4' result.o: In
functionnogvl_fetch_row':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:105: undefined reference to mysql_fetch_row#4' result.o: In
functionrb_mysql_result_free_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:75: undefined reference to mysql_free_result#4' result.o: In
functionrb_mysql_result_fetch_row':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:213: undefined reference to mysql_fetch_lengths#4'
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:215: undefined reference tomysql_num_fields#4' result.o: In
function rb_mysql_result_each':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:503: undefined reference tomysql_fetch_fields#4' result.o: In
function rb_mysql_result_free_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:75: undefined reference tomysql_free_result#4' result.o: In
function rb_mysql_result_each':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:531: undefined reference tomysql_fetch_fields#4' result.o: In
function rb_mysql_result_free_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:75: undefined reference tomysql_free_result#4' result.o: In
function rb_mysql_result_each':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:490: undefined reference tomysql_num_rows#4' result.o: In
function rb_mysql_result_free_result':
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\mysql2-0.3.13\ext\mysql2/re
sult.c:75: undefined reference tomysql_free_result#4' collect2: ld
returned 1 exit status make: *** [mysql2.so] Error 1
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/mysql2-0.3.13
for inspection. Results logged to
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.
3.13/ext/mysql2/gem_make.out
Can anyone please help? I am having much trouble comprehending what's wrong with the installation.
I had this same error on Win64 environment.
I tested a lot of solutions but the only that worked for me was:
gem install mysql2 -v '0.3.11'
I've been so annoyed by the same problem, and finally succeeded in installing mysql2. Kudos to odiszapc#github. It appears any other solution I've found via Google than below doesn't work to me.
Copied and pasted from here. So no credit to me.
gem uninstall mysql2
Download last MySQL connector from http://cdn.mysql.com/Downloads/Connector-C/mysql- connector-c-noinstall-6.0.2-win32.zip
Extract it to C:\connector-6.0.2
gem install mysql2 --platform=ruby -- '--with-mysql-lib="C:\connector-6.0.2\lib" --with-mysql-include="C:\connector-6.0.2\include" --with-mysql-dir="C:\connector-6.0.2"'
Additional info on mine.
ruby 1.9.3p392 (2013-02-22) [i386-mingw32]
Rails 3.2.13
MySQL Server 5.6
mysql2-0.3.13
P.S
Even if you successfully installed mysql2, you may still need some work (e.g. mysql2.so (LoadError)), and it has something do with libmysql in my case, and seems like yet another major glitch about mysql2.
I am installing on Windows 7 64 bit. What worked for me was:
Download the C 32 bit connector archive from: http://dev.mysql.com/downloads/connector/c/
I extracted it to C:\Temp. If you use a different directory, adjust the next command.
gem install mysql2 --platform=ruby -- '--with-mysql-dir="C:\Temp\mysql-connector-c-6.1.3-win32"'
pain... lot of pain. Finally working doing:
(Platform: Windows64bits, Ruby32bits, DevKit32bits...)
Download mysql connector for C from http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick
Unzip connector in a directory without spaces in names!
Copy lib/libmysql.dll file into ruby/bin one
gem install mysql2 -- --with-mysql-dir=D:\RoR\mysql-connector-c (so give the dir of connector and not the dir of server)
And I got mysql2 v0.3.17 up and running...
Download Mysql connector from http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick.
Extract it. copy lib\libmysql.dll file and paste it in Ruby's bin directory ex: C:\RailsInstaller\Ruby1.9.3\bin
Now again install Mysql2 gem gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.0\lib\opt" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.0\include"'
note: change mysql installation path as per yours
Try to bundle now
I'm getting an error during mysq installation from sources
[ 0%] Building C object cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_init':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: (Each undeclared identifier is reported only once
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:421: error: for each function it appears in.)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_reset':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:476: error: 'ED_UNASSIGNED' undeclared (first use in this function)
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c: In function 'ch_end':
/root/mysql/mysql-5.5.31/cmd-line-utils/libedit/chared.c:597: error: 'ED_UNASSIGNED' undeclared (first use in this function)
make[2]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/chared.c.o] Error 1
make[1]: *** [cmd-line-utils/libedit/CMakeFiles/edit.dir/all] Error 2
make: *** [all] Error 2
How to solve this error?
I checked mysql sources and indeed there is no ED_UNASSIGNED variable.
I had similar error.
I was using different folder for throwing CMAKE build files. From where I used to run "make".
"mysql-5.6.15" source folder
"MySQL Build" folder where I did throw make files and intended to build binaries.
I had a space in that folder name. Removing the space did the trick.
Though I see there is no spaces in your path but still make sure you are using no folder with "space". Having space in build folder also gives errors when your try to build MySQL from source on Windows.