簡體   English   中英

嘗試在Terminal for Rails中使用“捆綁安裝”命令並收到錯誤消息

[英]Attempted to use the 'bundle install' command in Terminal for Rails and received an error message

然后,我在列出該錯誤並收到以下錯誤消息后嘗試更新MySQL:

Gem files will remain installed in /Users/johnjackson/.rvm/gems/ruby-    2.2.1/gems/mysql2-0.3.18 for inspection.
Results logged to /Users/johnjackson/.rvm/gems/ruby-    2.2.1/extensions/x86_64-darwin-14/2.2.0/mysql2-0.3.18/gem_make.out
Johns-MacBook-Pro:Client johnjackson$ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.2.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile 0.6.2
Using nokogiri 1.6.6.2
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.6
Using loofah 2.0.1
Using rails-html-sanitizer 1.0.2
Using actionview 4.2.0
Using rack 1.6.0
Using rack-test 0.6.3
Using actionpack 4.2.0
Using globalid 0.3.5
Using activejob 4.2.0
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.2.0
Using activemodel 4.2.0
Using arel 6.0.0
Using activerecord 4.2.0
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bundler 1.8.5
Using columnize 0.9.0
Using byebug 4.0.5
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.2.0
Using coffee-rails 4.1.0
Using multi_json 1.11.0
Using jbuilder 2.2.13
Using jquery-rails 4.0.3

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/johnjackson/.rvm/rubies/ruby-2.2.1/bin/ruby -r     ./siteconf20150422-18439-16qcm93.rb extconf.rb 
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
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... no
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
--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=/Users/johnjackson/.rvm/rubies/ruby-2.2.1/bin/$(RUBY_BASE_NAME)
--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-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

extconf failed, exit code 1

Gem files will remain installed in /Users/johnjackson/.rvm/gems/ruby-    2.2.1/gems/mysql2-0.3.18 for inspection.
Results logged to /Users/johnjackson/.rvm/gems/ruby-2.2.1/extensions/x86_64-darwin-14/2.2.0/mysql2-0.3.18/gem_make.out

我不知道該怎么做才能確保“捆綁安裝”正常工作...當我嘗試修復MySQL錯誤代碼時,由於某種原因,每次MySQL安裝/更新都會失敗。

您需要在系統中安裝和運行MySQL服務器。 我相信您使用的是Mac OS,可以嘗試以下操作:

brew install mysql mysql.server start

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM