2014-10-27 83 views
1

我試圖安裝寶石tiny_tds我的MacBook,所以我第一次嘗試通過運行brew install freetds安裝freetds的依賴。但是,它不工作,我得到的是沒有意義的,我的錯誤:無法安裝/讓freetds的運行OS X Yosemite

libtool: link: clang -D_THREAD_SAFE -g -O2 -I/usr/local/opt/openssl/include -Wdeclaration-after-statement -o .libs/bsqldb bsqldb.o -L/usr/local/opt/openssl/lib ../dblib/.libs/libsybdb.dylib ../replacements/.libs/libreplacements.a -lssl -lcrypto /usr/local/Cellar/libiconv/1.13.1/lib/libiconv.dylib 
libtool: link: clang -D_THREAD_SAFE -g -O2 -I/usr/local/opt/openssl/include -Wdeclaration-after-statement -o .libs/datacopy datacopy.o -L/usr/local/opt/openssl/lib ../dblib/.libs/libsybdb.dylib ../replacements/.libs/libreplacements.a -lssl -lcrypto /usr/local/Cellar/libiconv/1.13.1/lib/libiconv.dylib 
make[2]: *** [all-recursive] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all-recursive] Error 1 

我也試圖編譯從源頭上freetds的,我也得到了一個錯誤:

/bin/sh ../../libtool --tag=CC --mode=link gcc -D_THREAD_SAFE -g -O2 -Wdeclaration-after-statement -o tsql tsql.o ../tds/libtds.la ../replacements/libreplacements.la -liconv -lncurses -lreadline 
libtool: link: gcc -D_THREAD_SAFE -g -O2 -Wdeclaration-after-statement -o tsql tsql.o ../tds/.libs/libtds.a ../replacements/.libs/libreplacements.a /usr/local/Cellar/libiconv/1.13.1/lib/libiconv.dylib -lncurses -lreadline 
Undefined symbols for architecture x86_64: 
    "_iconv", referenced from: 
     _tds_iconv_open in libtds.a(iconv.o) 
     _tds_iconv in libtds.a(iconv.o) 
     _tds_iconv_fread in libtds.a(iconv.o) 
    (maybe you meant: _tds_iconv_close, _tds_iconv , _tds_iconv_open , _tds_iconv_get , _tds_iconv_free , _tds_iconv_alloc , _tds_iconv_from_collate , _tds_iconv_fread) 
    "_iconv_close", referenced from: 
     _tds_iconv_open in libtds.a(iconv.o) 
     _tds_iconv_info_init in libtds.a(iconv.o) 
     _tds_iconv_close in libtds.a(iconv.o) 
     _tds_iconv in libtds.a(iconv.o) 
     _tds_iconv_get_info in libtds.a(iconv.o) 
     _tds_srv_charset_changed_num in libtds.a(iconv.o) 
     _tds_set_iconv_name in libtds.a(iconv.o) 
     ... 
    (maybe you meant: _tds_iconv_close) 
    "_iconv_open", referenced from: 
     _tds_iconv_open in libtds.a(iconv.o) 
     _tds_iconv_info_init in libtds.a(iconv.o) 
     _tds_iconv in libtds.a(iconv.o) 
     _tds_set_iconv_name in libtds.a(iconv.o) 
    (maybe you meant: _tds_iconv_open) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
make[3]: *** [tsql] Error 1 
make[2]: *** [all-recursive] Error 1 
make[1]: *** [all-recursive] Error 1 
make: *** [all-recursive] Error 1 

我真的不明白,爲什麼我不能編譯我的機器上freetds的,如果有人幫我,我會很高興!

預先感謝您。

回答

1

我居然找到了解決我的問題!顯然,libiconv的安裝,通過BREW依賴到另一個程序。但是這個安裝不是爲我的架構編譯的,所以不能正常工作。我不得不卸載libiconv的的BREW版本,然後手動重新安裝。

brew uninstall libiconv 
brew install libiconv 
brew install freetds 

我不確定有必要通過brew重新安裝libiconv,因爲它現在應該是Mac OS的一部分。希望這可以幫助有同樣問題的人。

+0

謝謝!這只是把我的頭撞向牆壁而挽救了我。 – wrydere 2014-12-05 05:42:22