के माध्यम से sqlite3 मणि स्थापित करने में त्रुटि मैं अपने खाते पर स्थापित sqlite3-ruby मणि (संस्करण 1.3.4) प्राप्त करने की कोशिश कर रहा हूं (साझा होस्टिंग पर CentOS, इसलिए मुझे रूट के बिना इसे स्थापित करने की आवश्यकता है) और SQLite का संस्करण स्थापित sqlite3-ruby के हाल के संस्करणों के लिए पर्याप्त नया नहीं है, इसलिए मुझे अपने खाते के अंतर्गत पुस्तकालयों को संकलित करने की आवश्यकता है। मैं जिस स्क्लाइट का उपयोग कर रहा हूं उसका संस्करण 1.7.0 है क्योंकि मुझे लगता है कि हाल के संस्करणों के साथ समस्याएं थीं।बंडलर
मैंने आगे बढ़ और यह पहले से ही किया है - मैं SQLite-3.7.0.tar.gz डाउनलोड किया है और यह स्थापित इस प्रकार है:
./configure –prefix=$HOME
make && make install
फिर 3 आवेदन मेरी रेल के पास गया और निम्न भाग गया:
bundle config build.sqlite3-ruby “--with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib”
तब:
bundle install --path vendor/bundle
हालांकि, मैं निम्नलिखित हो और मेरी बंडल पूरी तरह इंस्टा करने में विफल रहता ll:
Installing sqlite3 (1.3.4) with native extensions /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_initialize()... no
checking for sqlite3_backup_init()... no
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
creating Makefile
make
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -c sqlite3.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -c exception.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -c backup.c
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -fPIC -g -O2 -fPIC -c database.c
database.c: In function 'initialize':
database.c:47: error: 'SQLITE_OPEN_READWRITE' undeclared (first use in this function)
database.c:47: error: (Each undeclared identifier is reported only once
database.c:47: error: for each function it appears in.)
database.c:47: error: 'SQLITE_OPEN_CREATE' undeclared (first use in this function)
database.c:72: error: 'SQLITE_OPEN_READONLY' undeclared (first use in this function)
database.c: In function 'set_sqlite3_func_result':
database.c:278: error: 'sqlite3_int64' undeclared (first use in this function)
make: *** [database.o] Error 1
कोई विचार? यह काम करने के लिए प्रयोग किया जाता था, लेकिन sqlite3-ruby के हाल के संस्करणों के साथ ऐसा लगता है कि यह अब और नहीं है।
यहाँ कुछ अतिरिक्त जानकारी है:
rails -v
Rails 3.0.9
gem -v
1.7.2
.bash_profile:
PATH=$HOME/bin:$PATH
GEM_HOME=$HOME/gems
GEM_PATH=$HOME/gems
export LD_LIBRARY_PATH=$HOME/lib
export USERNAME BASH_ENV PATH GEM_HOME GEM_PATH
which sqlite3
/home/striketh/bin/sqlite3
संपादित करें:
मैं आगे चला गया और मेरी Gemfile में sqlite3 को sqlite3-माणिक से बदल गया है और भाग गया निम्नलिखित:
bundle config build.sqlite3 “--with-sqlite3-include=$HOME/include --with-sqlite3-lib=$HOME/lib --with-sqlite3-dir=$HOME”
यह त्रुटि संदेश मुझे मिला:
make
gcc -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DHAVE_SQLITE3_INITIALIZE -DHAVE_SQLITE3_BACKUP_INIT -I/home/striketh”/include -fPIC -g -O2 -fPIC -c sqlite3.c
In file included from ./sqlite3_ruby.h:42,
from sqlite3.c:1:
./backup.h:7: error: expected specifier-qualifier-list before 'sqlite3_backup'
make: *** [sqlite3.o] Error 1
कोई अन्य विचार?
homebrew या macports साथ sqlite3 के पुनर्निर्माण। – s84
@ Centode पर कोडग्लॉट? उसके साथ अच्छा भाग्य :)। –
@Striketh bqide sqlite3 के साथ आपको कुछ sqlite3 विकास पुस्तकालय स्थापित करना होगा, दुर्भाग्यवश मुझे बिल्कुल पता नहीं है कि कौन से हैं। डेबियन पर यह libsqlite3-dev और libsqlite3-0 है। –