Strona 1 z 2

Makefile gemfile mysql2 rubyonrails (błąd kompilacji)

: 13 października 2013, 21:27
autor: Never
Kiedy próbuję zainstalować gem mysql2 wyskakuje mi następujący błąd:

Kod: Zaznacz cały

root@d:# gem install mysql2
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
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 mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby1.9.1
    --with-mysql-config
    --without-mysql-config
    --with-mysql-dir
    --without-mysql-dir
    --with-mysql-include
    --without-mysql-include=${mysql-dir}/include
    --with-mysql-lib
    --without-mysql-lib=${mysql-dir}/lib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-mlib
    --without-mlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-zlib
    --without-zlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-socketlib
    --without-socketlib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-nsllib
    --without-nsllib
    --with-mysqlclientlib
    --without-mysqlclientlib
    --with-mygcclib
    --without-mygcclib
    --with-mysqlclientlib
    --without-mysqlclientlib


Gem files will remain installed in /var/lib/gems/1.9.1/gems/mysql2-0.3.13 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/mysql2-0.3.13/ext/mysql2/gem_make.out
Niestety nie znam się na Ruby On Rails, a jest mi ono jedynie potrzebne do postawienia redmine. Jak mogę rozwiązać ten problem?

: 14 października 2013, 07:14
autor: pone13
Zainstaluj libmysql++ i powtórz kompilację.

: 14 października 2013, 16:15
autor: Never
Udało się zainstalował gem mysql2, ale pojawił się nowy błąd:

Kod: Zaznacz cały

Installing rmagick (2.13.2) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb 
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes

Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /usr
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.2. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby1.9.1


Gem files will remain installed in /var/lib/gems/1.9.1/gems/rmagick-2.13.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out

An error occurred while installing rmagick (2.13.2), and Bundler cannot continue.
Make sure that `gem install rmagick -v '2.13.2'` succeeds before bundling.

Nie dało także nic podane wyżej gem install:

Kod: Zaznacz cały

root@a: # gem install rmagick -v '2.13.2'
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes

Warning: Found a partial ImageMagick installation. Your operating system likely has some built-in ImageMagick libraries but not all of ImageMagick. This will most likely cause problems at both compile and runtime.
Found partial installation at: /usr
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... yes
checking for sys/types.h... yes
checking for wand/MagickWand.h... no

Can't install RMagick 2.13.2. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby1.9.1


Gem files will remain installed in /var/lib/gems/1.9.1/gems/rmagick-2.13.2 for inspection.
 Results logged to /var/lib/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out
Edycja:
Dotychczasowe błędy udało mi się rozwiązać, niestety (mimo poszukiwań w internecie), nie udało mi się naprawić błędu wyskakującego w mojej aplikacji redmine w przeglądarce:
[code]uninitialized constant Gem::SourceIndex[/code]

: 15 października 2013, 07:45
autor: pone13
Sprawdź czy masz zainstalowane imagemagick

Kod: Zaznacz cały

$ dpkg -l | grep imagemagick
Jak nie masz to zainstaluj i ponów próbę instalacji.

: 15 października 2013, 17:28
autor: Never
Imagemagick jest zainstalowany:

Kod: Zaznacz cały

 root@d-vps:~# dpkg -l | grep imagemagick
ii  imagemagick-common                          8:6.7.7.10-5+deb7u2           all          image manipulation programs -- infrastructure


: 15 października 2013, 17:44
autor: pone13
Jednak nie :icon4: masz tylko zainstalowaną infrastrukturę, tak jest u mnie:

Kod: Zaznacz cały

pejot@karakoram:~$ dpkg -l | grep imagemagick
ii  imagemagick                           8:6.7.7.10-6                   amd64        image manipulation programs
ii  imagemagick-common                    8:6.7.7.10-6                   all          image manipulation programs -- infrastructure

: 15 października 2013, 19:03
autor: Never
Ponów próbę instalacji
Już zainstalowałem imagemagick, chodzi o ponowienie próby instalacji czego?

Edycja:
Wszystkie powyżej podane gemy są już zainstalowane

: 15 października 2013, 19:40
autor: pone13
Chodziło mi o to polecenie:

Kod: Zaznacz cały

[color=#333333]gem install rmagick -v '2.13.2'
[/color]

: 15 października 2013, 20:55
autor: Never
Został on zainstalowany, ale błąd nadal występuje:
Załącznik 5URU6Jp.jpg nie jest już dostępny

: 20 października 2013, 14:19
autor: Never
bump, ktoś wie jak rozwiązać problem?