我遇到一個問題,在OS X上安裝軟件包安裝RMySQL
包安裝RMySQL似乎工作,但是當包加載測試,它總是失敗:錯誤在OS X
* installing *source* package ‘RMySQL’ ... . .(omitted for brevity. see the gist linked below for the full installation log) . ** testing if installed package can be loaded Error : .onLoad failed in loadNamespace() for 'RMySQL', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.15/Resources/library/RMySQL/libs/i386/RMySQL.so': dlopen(/Library/Frameworks/R.framework/Versions/2.15/Resources/library/RMySQL/libs/i386/RMySQL.so, 6): Symbol not found: _mysql_affected_rows Referenced from: /Library/Frameworks/R.framework/Versions/2.15/Resources/library/RMySQL/libs/i386/RMySQL.so Expected in: flat namespace in /Library/Frameworks/R.framework/Versions/2.15/Resources/library/RMySQL/libs/i386/RMySQL.so Error: loading failed Execution halted ERROR: loading failed * removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/RMySQL’
全安裝日誌可以在這個gist找到。
這似乎與在32位與64位模式下運行R有關。我已經閱讀並試圖無濟於事所有這些:
- RMySQL with 64-bit R on Mac OS X
- RMySQL INSTALL instructions
- INSTALLING 64 AND 32-BIT PACKAGES IN R ON A MAC
系統信息:
- [R 2.15.2
- OS X 10.8.3(Mountain Lio N)
- MySQL的45年5月1日
- 的XCode 3.2
你有安裝了MySQL。這不是抱怨缺少編譯工具,所以我猜測你已經安裝了XCode(並且沒有告訴我們。) – 2013-05-10 17:46:22
好問題。是的,我安裝了MySQL和Xcode(我只是相應地更新了系統信息)。我也嘗試從oracle下載最新版本的MySQL,並明確使用它的lib和include路徑,按照以下說明操作:http://marc.info/?l=r-sig-db&m=125563172023273 – yoni 2013-05-10 18:39:02