# gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9 extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile
make
cc -I. -I/usr/include/ruby-1.9.0/x86_64-linux -I/usr/include/ruby-1.9.0 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_MYSQL_H -I/usr/local/include -fPIC -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: Tiedostoa tai hakemistoa ei ole
mysql.c: In function ‘make_field_obj’:
mysql.c:185: warning: unused variable ‘hash’
mysql.c: In function ‘escape_string’:
mysql.c:267: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘options’:
mysql.c:389: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c: In function ‘real_escape_string’:
mysql.c:401: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query’:
mysql.c:710: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:710: error: ‘struct RString’ has no member named ‘len’
mysql.c:729: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:729: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query_with_result_set’:
mysql.c:882: warning: implicit declaration of function ‘TypeError’
mysql.c: In function ‘fetch_field_direct’:
mysql.c:960: warning: implicit declaration of function ‘Raise’
mysql.c: In function ‘fetch_hash2’:
mysql.c:1032: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1033: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘field_inspect’:
mysql.c:1157: error: ‘struct RString’ has no member named ‘len’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_bind_result’:
mysql.c:1284: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_execute’:
mysql.c:1346: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1347: error: ‘struct RString’ has no member named ‘len’
mysql.c:1348: error: ‘struct RString’ has no member named ‘len’
mysql.c:1316: warning: unused variable ‘false’
mysql.c: In function ‘stmt_prepare’:
mysql.c:1584: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1584: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘time_inspect’:
mysql.c:1714: warning: format ‘%04d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 4 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 5 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 6 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 7 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 8 has type ‘long int’
mysql.c: In function ‘time_to_s’:
mysql.c:1727: warning: format ‘%04d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 4 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 5 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 6 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 7 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 8 has type ‘long int’
make: *** [mysql.o] Virhe 1
Gem files will remain installed in /usr/lib/ruby/gems/1.9.0/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.0/gems/mysql-2.7/gem_make.out
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9 extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... no
checking for mysql/mysql.h... yes
creating Makefile
make
cc -I. -I/usr/include/ruby-1.9.0/x86_64-linux -I/usr/include/ruby-1.9.0 -I. -DHAVE_MYSQL_SSL_SET -DHAVE_MYSQL_MYSQL_H -I/usr/local/include -fPIC -fno-strict-aliasing -g -g -O2 -O2 -g -Wall -Wno-parentheses -fPIC -o mysql.o -c mysql.c
mysql.c:6:21: error: version.h: Tiedostoa tai hakemistoa ei ole
mysql.c: In function ‘make_field_obj’:
mysql.c:185: warning: unused variable ‘hash’
mysql.c: In function ‘escape_string’:
mysql.c:267: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:268: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘options’:
mysql.c:389: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c: In function ‘real_escape_string’:
mysql.c:401: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:402: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query’:
mysql.c:710: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:710: error: ‘struct RString’ has no member named ‘len’
mysql.c:729: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:729: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘query_with_result_set’:
mysql.c:882: warning: implicit declaration of function ‘TypeError’
mysql.c: In function ‘fetch_field_direct’:
mysql.c:960: warning: implicit declaration of function ‘Raise’
mysql.c: In function ‘fetch_hash2’:
mysql.c:1032: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1033: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘field_inspect’:
mysql.c:1157: error: ‘struct RString’ has no member named ‘len’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1158: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_bind_result’:
mysql.c:1284: error: ‘struct RString’ has no member named ‘ptr’
mysql.c: In function ‘stmt_execute’:
mysql.c:1346: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1347: error: ‘struct RString’ has no member named ‘len’
mysql.c:1348: error: ‘struct RString’ has no member named ‘len’
mysql.c:1316: warning: unused variable ‘false’
mysql.c: In function ‘stmt_prepare’:
mysql.c:1584: error: ‘struct RString’ has no member named ‘ptr’
mysql.c:1584: error: ‘struct RString’ has no member named ‘len’
mysql.c: In function ‘time_inspect’:
mysql.c:1714: warning: format ‘%04d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 4 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 5 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 6 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 7 has type ‘long int’
mysql.c:1714: warning: format ‘%02d’ expects type ‘int’, but argument 8 has type ‘long int’
mysql.c: In function ‘time_to_s’:
mysql.c:1727: warning: format ‘%04d’ expects type ‘int’, but argument 3 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 4 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 5 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 6 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 7 has type ‘long int’
mysql.c:1727: warning: format ‘%02d’ expects type ‘int’, but argument 8 has type ‘long int’
make: *** [mysql.o] Virhe 1
Gem files will remain installed in /usr/lib/ruby/gems/1.9.0/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.0/gems/mysql-2.7/gem_make.out
Vastaukset 12
Vanhimmat
mysql.c:6:21: error: version.h: Tiedostoa tai hakemistoa ei ole
dev paketit kans...
# apt-get install libmysqlclient15-dev
Luetaan pakettiluetteloita... Valmis
Muodostetaan riippuvuussuhteiden puu
Luetaan tilatiedot... Valmis
libmysqlclient15-dev on jo uusin versio.
0 päivitetty, 0 uutta asennusta, 0 poistettavaa ja 0 päivittämätöntä.
asdf...
dev-paketit joista toi härpäke riippuu ja roikkuu.
# find / -name mysql.h
/usr/include/mysql/mysql.h
# ruby -v
ruby 1.9.0 (2008-06-20 revision 17482) [x86_64-linux]
# gem -v
1.3.1
# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 106
Server version: 5.0.51a-24 (Debian)
Mitkä härpäkepaketit?
mitä asennat, mutta...
-I/usr/include/ruby-1.9.0/x86_64-linux -I/usr/include/ruby-1.9.0
^-- entä rubyn dev paketit? -I optio gcc:lle tarkottaa include-hakemistoa (eli .h tiedostoja)
Asennan Ruby on Rails ympäristöä ja tarvitsen siihen myös mysql gemin.
ruby1.9-dev on asennettu, samoin liberuby ja liberuby-dev
Mitä muuta pitäisi asentaa?
... pistin
rubygems libmysqlclient-dev ruby1.8 ruby1.8-dev
gem install rails
gem install mysql
män oikkee hyvi. Toivottavasti en unohtanut mitään. Myslin vetäsin kanssa, mut en tiedä tarviiko sitä.
mullakin 1.8:lla asentui.
mitään... katon myöhemmin jos jaksan.
# rails
gem_prelude.rb:114:in `push_gem_version_on_load_path': undefined method `' for nil:NilClass (NoMethodError)
from gem_prelude.rb:8:in `gem'
from /usr/bin/rails:18:in `'
# aptitude show rails
Paketti: rails
Tila: ei asennettu
Versio: 2.1.0-6
Tärkeys: valinnainen
Ryhmä: web
Vastuuhenkilö: Adam Majer
Koko purettuna: 24,5M
Riippuvuudet: ruby, ruby1.8 (>= 1.8.2-3), rake (> 0.7.0), rdoc (> 1.8.2), libsqlite3-ruby1.8 |
libpgsql-ruby1.8 | libmysql-ruby1.8 | libdbi-ruby1.8, libredcloth-ruby1.8, liberb-ruby,
libruby1.8-extras, libjs-prototype, libxml-simple-ruby (> 1.0.11), libbuilder-ruby1.8 (>
2.1.2)
Esiriippuvuudet: dpkg (>= 1.10.24)
Suosittelut: irb (> 1.8), libmocha-ruby1.8
Ehdotukset: libapache2-mod-ruby | libapache-mod-ruby | libapache2-mod-fcgid, libfcgi-ruby1.8
Ristiriidat: libdevel-logger-ruby1.8
Kuvaus: MVC ruby based framework geared for web application development
Rails is a full-stack, open-source web framework in Ruby for writing real-world applications.
Being a full-stack framework means that all layers are built to work seamlessly together. That way you
don't repeat yourself and you can use a single language from top to bottom. Everything from templates to
control flow to business logic is written in Ruby.
Homepage: http://rubyonrails.com