I am trying to install rgl package (0.92.858) for R (2.14.2) under Mac OS X (Lion 10.7.3). When I try to load it (library(rgl)), I get the following error:
我正在尝试在Mac OS X (Lion 10.7.3)下为R(2.14.2)安装rgl包(0.92.858)。当我尝试加载它(library(rgl))时,我得到以下错误:
Error : .onLoad failed in loadNamespace() for 'rgl', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so, 6): Symbol not found: __ZN3gui13OSXGUIFactory12hasEventLoopEv
Referenced from: /Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so
Expected in: dynamic lookup
I have a Mac with Norwegian keyboard. Maybe this has something to do with the issue? However, I get the same error, even though I change the language to U.S. Has anyone experienced similar problem? Any way solving it?
我有一个带有挪威键盘的Mac电脑。也许这和问题有关?然而,我也犯了同样的错误,即使我把语言改成了U.S.(美国),有人遇到过类似的问题吗?任何方式解决吗?
6 个解决方案
#1
16
I was having this problem with rgl 0.93.996 on OSX 10.9.2, but then after reinstalling several times I saw "Installing rgl - error: X11 not found but required, configure aborted"
我在OSX 10.9.2上遇到了rgl 0.93.996的问题,但是在重新安装了几次之后,我看到了“安装rgl - error: X11没有找到但需要,配置已中止”
A quick search took me here https://stat.ethz.ch/pipermail/r-sig-mac/2012-March/009077.html
我在这里快速搜索了https://stat.ethz.ch/pipermail/r-sig-mac/2012-March/009077.html
Then I was finally able to get it to work by downloading XQuartz https://www.xquartz.org So it was X11 that was the problem in my case.
然后我终于可以通过下载XQuartz https://www.xquartz.org来完成它,所以我的问题就是X11。
#2
7
It requires building from the source as there is a problem with the path to libpng.dylib path if using the built in source install. The process is:
由于到libpng的路径存在问题,所以需要从源开始构建。如果使用内建的源代码安装,则使用dylib路径。这个过程是:
1) Download the source files from http://download.r-forge.r-project.org/src/contrib/rgl_0.92.879.tar.gz - You need to download the source files from here since you have to manually install the program.
1)从http://download.r-forge.r- project.org/src/后悔/rgl_0.92.879.tar.gz下载源文件——你需要从这里下载源文件,因为你必须手动安装程序。
2) Unzip the files to a convenient location. You can do this by double clicking on the .tar file
2)将文件解压到一个方便的位置。您可以通过双击.tar文件来实现这一点
3) Open Terminal and navigate to the directory that you placed the files in. I put them on my desktop so the command is:
3)打开终端,导航到文件所在的目录。我把它们放在我的桌面上,所以命令是:
cd ~/Desktop
4) In Terminal run
4)在终端运行
R CMD INSTALL --with-libpng-prefix=/usr/X11/lib/ rgl
You can then delete all the files you downloaded. Note that I am running Mac OS X 10.7.3 with R 2.15.0. The specific paths may be slightly different if you are on a different version. You do not need the rgl folder or files after you install them and they can be deleted.
然后可以删除所有下载的文件。注意,我正在运行Mac OS X 10.7.3和r2.15.0。如果使用不同的版本,具体的路径可能略有不同。安装后不需要rgl文件夹或文件,可以删除它们。
#3
3
I was still having issues installing from source with special flags or any of the other suggestions in comments and things above. I am using Mac OS X 10.7.3 on a 64-bit MacBook Pro and R 2.15.0
我仍然有从源代码安装特殊标志或任何其他建议在评论和上面的事情。我在64位MacBook Pro和r2.15.0上使用Mac OS X 10.7.3。
I continued to get the following when loading the rgl
package: error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so'
在加载rgl包时,我继续得到以下信息:错误:无法加载共享对象'/Library/ framework/ R.framework/ version /2.14/Resources/ rgl/libs/x86_64/aglrgl.so'
I tried the following sub-optimal solution works: Delete the aglrgl.so
file. Then try loading the package again. (This is a suggestion I took from a post by Duncan Murdoch )
我尝试了以下次最优解决方案:删除aglrgl。所以文件。然后再试着装包裹。(这是我从邓肯·默多克的文章中得到的建议)
A quick way to delete this file is to type the following into the terminal: open -a Finder /Library/Frameworks/R.framework/Versions/2.15/Resources/library/rgl/libs/x86_64/
删除该文件的一个快速方法是将以下内容输入到终端:open -a查找器/库/框架/R.framework/版本/2.15/资源/库/rgl/libs/x86_64/
In the new Finder
window that pops up, delete the aglrgl.so
file, and then close the window. Open the R-GUI, and try loading rgl
: library("rgl")
. It should work fine, and unfortunately use X11
for the 3D graphics instead of the native Quartz window. For me, this is better than nothing.
在弹出的新查找程序窗口中,删除aglrgl。文件,然后关闭窗口。打开R-GUI,并尝试加载rgl: library(“rgl”)。它应该可以正常工作,不幸的是,使用X11作为3D图形,而不是使用本机Quartz窗口。对我来说,这总比什么都没有好。
#4
2
The problem is now documented on R-forge : http://r-forge.r-project.org/tracker/index.php?func=detail&aid=1996&group_id=234&atid=946
问题记录在R-forge: http://r-forge.r-project.org/tracker/index.php?
You basically have to delete the incriminated file, aglrgl.so. R gives you the file's path in the displayed error message.
你基本上要删除被定罪的文件aglrgl。在显示的错误消息中,R给出了文件的路径。
#5
1
The new Mac binary version of rgl 0.92.861 installs on 2.14.2 without error and runs the example code.
新的Mac二进制版本的rgl 0.92.861在2.14.2安装时没有错误,并运行示例代码。
#6
0
Okay solution in my case (OS X Yosemite), first download the RGL source (not binaries) in http://cran.r-project.org/src/contrib/rgl_0.95.1247.tar.gz, extract it, and build the library using this command: R CMD INSTALL --disable-cocoa --x-includes=/usr/X11/ rgl
and it works like a charm.
好的解决方案(OS X Yosemite),首先下载http://cran.r- project.org/src/后悔/rgl_0.95.1247.tar.gz中的RGL源文件(不是二进制文件),提取出来,然后使用以下命令构建库:R CMD INSTALL——disable-cocoa——X -include =/usr/X11/ RGL。
#1
16
I was having this problem with rgl 0.93.996 on OSX 10.9.2, but then after reinstalling several times I saw "Installing rgl - error: X11 not found but required, configure aborted"
我在OSX 10.9.2上遇到了rgl 0.93.996的问题,但是在重新安装了几次之后,我看到了“安装rgl - error: X11没有找到但需要,配置已中止”
A quick search took me here https://stat.ethz.ch/pipermail/r-sig-mac/2012-March/009077.html
我在这里快速搜索了https://stat.ethz.ch/pipermail/r-sig-mac/2012-March/009077.html
Then I was finally able to get it to work by downloading XQuartz https://www.xquartz.org So it was X11 that was the problem in my case.
然后我终于可以通过下载XQuartz https://www.xquartz.org来完成它,所以我的问题就是X11。
#2
7
It requires building from the source as there is a problem with the path to libpng.dylib path if using the built in source install. The process is:
由于到libpng的路径存在问题,所以需要从源开始构建。如果使用内建的源代码安装,则使用dylib路径。这个过程是:
1) Download the source files from http://download.r-forge.r-project.org/src/contrib/rgl_0.92.879.tar.gz - You need to download the source files from here since you have to manually install the program.
1)从http://download.r-forge.r- project.org/src/后悔/rgl_0.92.879.tar.gz下载源文件——你需要从这里下载源文件,因为你必须手动安装程序。
2) Unzip the files to a convenient location. You can do this by double clicking on the .tar file
2)将文件解压到一个方便的位置。您可以通过双击.tar文件来实现这一点
3) Open Terminal and navigate to the directory that you placed the files in. I put them on my desktop so the command is:
3)打开终端,导航到文件所在的目录。我把它们放在我的桌面上,所以命令是:
cd ~/Desktop
4) In Terminal run
4)在终端运行
R CMD INSTALL --with-libpng-prefix=/usr/X11/lib/ rgl
You can then delete all the files you downloaded. Note that I am running Mac OS X 10.7.3 with R 2.15.0. The specific paths may be slightly different if you are on a different version. You do not need the rgl folder or files after you install them and they can be deleted.
然后可以删除所有下载的文件。注意,我正在运行Mac OS X 10.7.3和r2.15.0。如果使用不同的版本,具体的路径可能略有不同。安装后不需要rgl文件夹或文件,可以删除它们。
#3
3
I was still having issues installing from source with special flags or any of the other suggestions in comments and things above. I am using Mac OS X 10.7.3 on a 64-bit MacBook Pro and R 2.15.0
我仍然有从源代码安装特殊标志或任何其他建议在评论和上面的事情。我在64位MacBook Pro和r2.15.0上使用Mac OS X 10.7.3。
I continued to get the following when loading the rgl
package: error: unable to load shared object '/Library/Frameworks/R.framework/Versions/2.14/Resources/library/rgl/libs/x86_64/aglrgl.so'
在加载rgl包时,我继续得到以下信息:错误:无法加载共享对象'/Library/ framework/ R.framework/ version /2.14/Resources/ rgl/libs/x86_64/aglrgl.so'
I tried the following sub-optimal solution works: Delete the aglrgl.so
file. Then try loading the package again. (This is a suggestion I took from a post by Duncan Murdoch )
我尝试了以下次最优解决方案:删除aglrgl。所以文件。然后再试着装包裹。(这是我从邓肯·默多克的文章中得到的建议)
A quick way to delete this file is to type the following into the terminal: open -a Finder /Library/Frameworks/R.framework/Versions/2.15/Resources/library/rgl/libs/x86_64/
删除该文件的一个快速方法是将以下内容输入到终端:open -a查找器/库/框架/R.framework/版本/2.15/资源/库/rgl/libs/x86_64/
In the new Finder
window that pops up, delete the aglrgl.so
file, and then close the window. Open the R-GUI, and try loading rgl
: library("rgl")
. It should work fine, and unfortunately use X11
for the 3D graphics instead of the native Quartz window. For me, this is better than nothing.
在弹出的新查找程序窗口中,删除aglrgl。文件,然后关闭窗口。打开R-GUI,并尝试加载rgl: library(“rgl”)。它应该可以正常工作,不幸的是,使用X11作为3D图形,而不是使用本机Quartz窗口。对我来说,这总比什么都没有好。
#4
2
The problem is now documented on R-forge : http://r-forge.r-project.org/tracker/index.php?func=detail&aid=1996&group_id=234&atid=946
问题记录在R-forge: http://r-forge.r-project.org/tracker/index.php?
You basically have to delete the incriminated file, aglrgl.so. R gives you the file's path in the displayed error message.
你基本上要删除被定罪的文件aglrgl。在显示的错误消息中,R给出了文件的路径。
#5
1
The new Mac binary version of rgl 0.92.861 installs on 2.14.2 without error and runs the example code.
新的Mac二进制版本的rgl 0.92.861在2.14.2安装时没有错误,并运行示例代码。
#6
0
Okay solution in my case (OS X Yosemite), first download the RGL source (not binaries) in http://cran.r-project.org/src/contrib/rgl_0.95.1247.tar.gz, extract it, and build the library using this command: R CMD INSTALL --disable-cocoa --x-includes=/usr/X11/ rgl
and it works like a charm.
好的解决方案(OS X Yosemite),首先下载http://cran.r- project.org/src/后悔/rgl_0.95.1247.tar.gz中的RGL源文件(不是二进制文件),提取出来,然后使用以下命令构建库:R CMD INSTALL——disable-cocoa——X -include =/usr/X11/ RGL。