2016-12-28 3 views
1

Metasploit 프레임 워크 (중요하지 않음)를 설치하려고하는데 bundler가 일관되게 실패하는 sqlite3을 설치하려고합니다. sqlite3를 설치한다 (명령 줄에서 실행 sqlite3를 환경에 나를 제공)과 (어떤 이유로, 그리고 --force 추가) brew link sqlite3를 사용하여 연결되어 있지만,이 오류와 함께 때마다 bundler install 실패Ruby Sqlite3 설치 sqlite3_libversion_number() macOS Sierra

sudo gem install sqlite3 
Building native extensions. This could take a while... 
ERROR: Error installing sqlite3: 
    ERROR: Failed to build gem native extension. 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
Error: Running Homebrew as root is extremely dangerous and no longer supported. 
As Homebrew does not drop privileges on installation you would be giving all 
build scripts full access to your system. 
checking for sqlite3.h... yes 
checking for pthread_create() in -lpthread... yes 
checking for sqlite3_libversion_number() in -lsqlite3... no 
sqlite3 is missing. Try 'brew install sqlite3', 
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' 
and check your shared library search path (the 
location where your sqlite3 shared library is located). 
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 
    --with-sqlite3-config 
    --without-sqlite3-config 
    --with-pkg-config 
    --without-pkg-config 
    --with-sqlite3-dir 
    --without-sqlite3-dir 
    --with-sqlite3-include 
    --without-sqlite3-include=${sqlite3-dir}/include 
    --with-sqlite3-lib 
    --without-sqlite3-lib=${sqlite3-dir}/ 
    --with-pthreadlib 
    --without-pthreadlib 
    --with-sqlite3lib 
    --without-sqlite3lib 


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.12 for inspection. 
Results logged to /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.12/ext/sqlite3/gem_make.out 
+0

'gem install sequel mysql sqlite3'을 설치하려고하는 것과 똑같은 문제가있어서 https : // stackover처럼 mysql을 sqlite로 변환 할 수 있습니다. flow.com/a/11328913/539149 솔루션을 찾았습니까? –

답변

7

I

$ whereis sqlite3 
/usr/bin/sqlite3 
# if binary is in /usr/bin then library is typically in /usr/lib 
$ gem install sqlite3 -- --with-sqlite3-lib=/usr/lib 
Building native extensions with: '--with-sqlite3-lib=/usr/lib' 
This could take a while... 
Successfully installed sqlite3-1.3.13 
Parsing documentation for sqlite3-1.3.13 
Done installing documentation for sqlite3 after 0 seconds 
1 gem installed 
나는 Homebrew 라이브러리 디렉토리를 지정하려

하지만 몇 가지 이유가 'didn를 마지막으로 내장 된 맥 OS X SQLite는 라이브러리 디렉토리 맥 OS 시에라 10.12.5 (16F73)에 지정 하여이 문제를 해결하기 위해 관리 일 :

$ brew ls --verbose sqlite3 
/usr/local/Cellar/sqlite/3.19.3/.brew/sqlite.rb 
/usr/local/Cellar/sqlite/3.19.3/bin/sqlite3 
/usr/local/Cellar/sqlite/3.19.3/include/msvc.h 
/usr/local/Cellar/sqlite/3.19.3/include/sqlite3.h 
/usr/local/Cellar/sqlite/3.19.3/include/sqlite3ext.h 
/usr/local/Cellar/sqlite/3.19.3/INSTALL_RECEIPT.json 
/usr/local/Cellar/sqlite/3.19.3/lib/libsqlite3.0.dylib 
/usr/local/Cellar/sqlite/3.19.3/lib/libsqlite3.a 
/usr/local/Cellar/sqlite/3.19.3/lib/libsqlite3.dylib 
/usr/local/Cellar/sqlite/3.19.3/lib/pkgconfig/sqlite3.pc 
/usr/local/Cellar/sqlite/3.19.3/README.txt 
/usr/local/Cellar/sqlite/3.19.3/share/man/man1/sqlite3.1 
$ gem install sqlite3 -- --with-sqlite3-lib=/usr/local/Cellar/sqlite/3.19.3/lib 
This could take a while... 
ERROR: Error installing sqlite3: 
    ERROR: Failed to build gem native extension. 
... 

누군가가 브루 라이브러리 디렉토리를 지정하는 방법을 알고있는 경우, 해당 설치 (가정 MacPorts 작품하지만 난 더 이상 사용하지)를 통해 좀 더 컨트롤을 제공하기 때문 알려 주시기 바랍니다.

호기심있는 사람들을위한

, 여기에 설치하는 전체 명령입니다 루비의 Sequel :

gem install sequel mysql sqlite3 -- --with-sqlite3-lib=/usr/lib 

어떻게 my comment on the question에서 SQLite에하는 호스트 포트 3306에 듣고 Laravel Homestead MySQL 데이터베이스로 변환하는 방법 :

sequel mysql://homestead:[email protected]:3306/my_database -C sqlite://my_database.sqlite 
+0

2017-Nov-20 '보석 설치 sqlite3 --with-sqlite3-lib =/usr/lib'완전히 내 문제를 해결합니다. 감사합니다! – NamNamNam