tags:

views:

67

answers:

0

I have installed ruby and gems (both from macport) and have mysql 5.1.49 (see below for full details of version). I get an error on libssl 0.9.8 when I try to install the mysql gem. Any suggestions

    jcoelh000 ~# mysql --version
    mysql  Ver 14.14 Distrib 5.1.49, for apple-darwin9.8.0 (i386) using readline 5.1

    jcoelh000 ~# ruby -v
    ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin9]

    jcoelh000 ~# gem -v
    1.3.7

    jcoelh000 ~# which ruby
    /opt/local/bin/ruby
    jcoelh000 ~# which gem
    /opt/local/bin/gem

    jcoelh000 ~# ls  /opt/local/lib/libssl.*
    /opt/local/lib/libssl.1.0.0.dylib       
    /opt/local/lib/libssl.a                  
    /opt/local/lib/libssl.dylib

    jcoelh000 ~# sudo gem install mysql
    Building native extensions.  This could take a while...
    ERROR:  Error installing mysql:
            ERROR: Failed to build gem native extension.

    /opt/local/bin/ruby extconf.rb
    checking for mysql_ssl_set()... yes
    checking for rb_str_set_len()... yes
    checking for rb_thread_start_timer()... yes
    checking for mysql.h... yes
    creating Makefile

    make
    /usr/bin/gcc-4.0 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin9 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_RB_STR_SET_LEN -DHAVE_RB_THREAD_START_TIMER -DHAVE_MYSQL_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE  -I/opt/local/include -I/opt/local/include/mysql5/mysql  -arch i386   -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -fno-common -O2 -arch i386  -fno-common -pipe -fno-common  -arch i386 -c mysql.c
    /usr/bin/gcc-4.0 -dynamic -bundle -undefined suppress -flat_namespace -o mysql_api.bundle mysql.o -L. -L/opt/local/lib -L. -L/opt/local/lib -arch i386  -arch i386  -lruby -L/opt/local/lib  -L/opt/local/lib/mysql5/mysql -lmysqlclient -L/opt/local/lib -lz -lm  -L/opt/local/lib -lssl -lcrypto  -lpthread -ldl -lobjc  
    ld: file not found: /opt/local/lib/libssl.0.9.8.dylib
    collect2: ld returned 1 exit status
    make: *** [mysql_api.bundle] Error 1


    Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
    Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out