乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      MacOS 10.14安裝和brew更新后無法安裝mysql gem

       印度阿三17 2019-08-28

      在macOS 10.14安裝Brew更新后,我的開發(fā)系統(tǒng)壞了.

      我無法安裝mysql gem.在嘗試安裝時,我得到:

      $gem install mysql -v '2.8.1' --source 'http:///'
      Building native extensions.  This could take a while...
      ERROR:  Error installing mysql:
          ERROR: Failed to build gem native extension.
      
          current directory: /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/mysql-2.8.1/ext/mysql_api
      /Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -r ./siteconf20180926-49343-waujia-0.rb 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... no
      checking for mysql/mysql.h... 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=/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/bin/ruby
          --with-mysql-config
          --without-mysql-config
      
      To see why this extension failed to compile, please check the mkmf.log which can be found here:
      
        /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/extensions/x86-darwin-14/1.8/mysql-2.8.1/mkmf.log
      
      extconf failed, exit code 1
      
      Gem files will remain installed in /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/mysql-2.8.1 for inspection.
      Results logged to /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/extensions/x86-darwin-14/1.8/mysql-2.8.1/gem_make.out
      

      相對mkmf.log是:

      have_func: checking for mysql_ssl_set()... -------------------- yes
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      conftest.c: In function 't':
      conftest.c:3:53: error: 'mysql_ssl_set' undeclared (first use in this function)
       int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
                                                           ^
      conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
      /* end */
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { mysql_ssl_set(); return 0; }
      /* end */
      
      --------------------
      
      have_func: checking for rb_str_set_len()... -------------------- yes
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      conftest.c: In function 't':
      conftest.c:3:53: error: 'rb_str_set_len' undeclared (first use in this function)
       int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
                                                           ^
      conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
      /* end */
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { rb_str_set_len(); return 0; }
      /* end */
      
      --------------------
      
      have_func: checking for rb_thread_start_timer()... -------------------- yes
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      conftest.c: In function 't':
      conftest.c:3:53: error: 'rb_thread_start_timer' undeclared (first use in this function)
       int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
                                                           ^
      conftest.c:3:53: note: each undeclared identifier is reported only once for each function it appears in
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
      /* end */
      
      "/usr/local/bin/gcc-4.9 -o conftest -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common   conftest.c  -L. -L/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib -L. -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl098/lib    -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -lruby-static -L/usr/local/Cellar/mysql/5.7.21/lib -lmysqlclient -lssl -lcrypto  -ldl -lobjc  "
      ld: warning: directory not found for option '-L/usr/local/opt/openssl098/lib'
      checked program was:
      /* begin */
      1: /*top*/
      2: int main() { return 0; }
      3: int t() { rb_thread_start_timer(); return 0; }
      /* end */
      
      --------------------
      
      have_header: checking for mysql.h... -------------------- no
      
      "/usr/local/bin/gcc-4.9 -E -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common    conftest.c -o conftest.i"
      In file included from conftest.c:1:0:
      /usr/local/Cellar/mysql/5.7.21/include/mysql/mysql.h:35:23: fatal error: sys/types.h: No such file or directory
       #include <sys/types.h>
                             ^
      compilation terminated.
      checked program was:
      /* begin */
      1: #include <mysql.h>
      /* end */
      
      --------------------
      
      have_header: checking for mysql/mysql.h... -------------------- no
      
      "/usr/local/bin/gcc-4.9 -E -I. -I/Users/MYACCOUNT/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/1.8/i686-darwin14.4.0 -I.  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -I/usr/local/Cellar/mysql/5.7.21/include/mysql  -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl098/include -O2 -fno-tree-dce -fno-optimize-sibling-calls  -fno-common -pipe -fno-common    conftest.c -o conftest.i"
      In file included from conftest.c:1:0:
      /usr/local/include/mysql/mysql.h:35:23: fatal error: sys/types.h: No such file or directory
       #include <sys/types.h>
                             ^
      compilation terminated.
      checked program was:
      /* begin */
      1: #include <mysql/mysql.h>
      /* end */
      
      --------------------
      

      我通過Brew安裝了mysql并保持mysql,mysql @ 5.6或mysql@5.7有效.路徑在.bash_profile中設置:

      ### Customize path for MYSQL
      MYSQL=/usr/local/mysql/bin
      export PATH=$PATH:$MYSQL
      export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH
      

      當我切換到mysql@5.6或5.7時,我相應地改變了路徑.
      一般來說,mysql似乎存在一些問題.

      當Ruby 1.8.7中的一個webapp,運行mysql數(shù)據(jù)庫的Rails 3.2.5時,另外兩個具有相同技術堆棧的webapp無法重新安裝mysql gem或連接到數(shù)據(jù)庫.

      $rake db:migrate --trace
      ** Invoke db:migrate (first_time)
      ** Invoke environment (first_time)
      ** Execute environment
      rake aborted!
      Mysql::Error: Table 'dev_WEBPROJECT.safts' doesn't exist: SHOW FULL FIELDS FROM `safts`
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `query'
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `execute'
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/activerecord-3.2.5/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
      .
      .
      .
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/gems/rake-0.9.6/bin/rake:37
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/bin/rake:22:in `load'
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/bin/rake:22
      /Users/MYACCOUNT/.rvm/gems/ruby-1.8.7-p374@WEBPROJECT/bin/ruby_executable_hooks:15
      Tasks: TOP => db:migrate => environment
      

      有人可以幫忙嗎?

      解決方法:

      Mojave更改了編譯C擴展所需的頭文件的位置.您可能需要運行以下命令來安裝mysql gem:

      sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
      

      參考:https:///setup/osx/10.14-mojave

      來源:https://www./content-2-417651.html

        本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
        轉(zhuǎn)藏 分享 獻花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多