2016-12-24 147 views
6

我在Mac OS Sierra上。在Mac上安裝ROracle

我試過 - Installation of RODBC/ROracle packages on OS X Mavericks但它沒有幫助。

這是我做過什麼:

  • 從​​下載 - Basic中,SQL Plus中,ODBC
  • 在我的主文件夾解壓縮到instantclient_12_1
  • LN -s libclntsh.dylib.12.1 libclntsh.dylib
  • 出口DYLD_LIBRARY_PATH = /用戶/ dhananjaygoel/instantclient_12_1:$ DYLD_LIBRARY_PATH
  • - [R CMD INSTALL --configure-ARGS = ' - 與-OCI-LIB = /用戶/ dhananjaygoel/instantclient_12_1' ROracle _1.3-1.tar.gz

它給了我下面的錯誤:

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library’ 
* installing *source* package ‘ROracle’ ... 
** package ‘ROracle’ successfully unpacked and MD5 sums checked 
configure: creating ./config.status 
config.status: creating src/Makevars 
** libs 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Users/dhananjaygoel/instantclient_12_1/sdk/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -I/opt/local/include -c rodbi.c -o rodbi.o 
rodbi.c:2432:53: warning: format specifies type 'long long' but the argument has 
     type 'sb8' (aka 'long') [-Wformat] 
     sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz); 
                ^~~~~ 
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 
    __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) 
                 ^~~~~~~~~~~ 
rodbi.c:2469:53: warning: format specifies type 'long long' but the argument has 
     type 'sb8' (aka 'long') [-Wformat] 
     sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz); 
                ^~~~~ 
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 
    __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) 
                 ^~~~~~~~~~~ 
rodbi.c:2816:55: warning: format specifies type 'long long' but the argument has 
     type 'sb8' (aka 'long') [-Wformat] 
      sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz); 
                 ^~~~~ 
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 
    __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) 
                 ^~~~~~~~~~~ 
rodbi.c:2861:55: warning: format specifies type 'long long' but the argument has 
     type 'sb8' (aka 'long') [-Wformat] 
      sprintf(err_buf, RODBI_ERR_BIND_VAL_TOOBIG, bndsz); 
                 ^~~~~ 
/usr/include/secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 
    __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) 
                 ^~~~~~~~~~~ 
4 warnings generated. 
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/Users/dhananjaygoel/instantclient_12_1/sdk/include -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -I/opt/local/include -c rooci.c -o rooci.o 
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o ROracle.so rodbi.o rooci.o -L/Users/dhananjaygoel/instantclient_12_1 -lclntsh -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation 
installing to /Library/Frameworks/R.framework/Versions/3.3/Resources/library/ROracle/libs 
** R 
** inst 
** preparing package for lazy loading 
** help 
*** installing help indices 
** building package indices 
** testing if installed package can be loaded 
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
    unable to load shared object '/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ROracle/libs/ROracle.so': 
    dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ROracle/libs/ROracle.so, 6): Library not loaded: @rpath/libclntsh.dylib.12.1 
    Referenced from: /Library/Frameworks/R.framework/Versions/3.3/Resources/library/ROracle/libs/ROracle.so 
    Reason: image not found 
Error: loading failed 
Execution halted 
ERROR: loading failed 
* removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ROracle’ 

有人請幫助。

+0

你找到了解決方案嗎? – sand

回答

-1

我找到了this googling around。
只需按Ctrl + f(或Mac上的替代選項,我使用的是Linux)單詞「找不到圖像」,它會將您帶入問題。
該頁面將導致您最終到達here
這是非常類似於您的錯誤,但是,我沒有任何使用Mac的經驗,希望它幫助,雖然:)