libpng 警告:使用 libpng-1.2.26 构建但使用 1.5.2 运行的应用程序
当我尝试在 R 中生成 png 图像时,我的 mac 上遇到了问题。
我收到此警告:
libpng warning: Applicationbuilt with libpng-1.2.26 but running with 1.5.2
我正在使用 R-studio GUI 运行 R 2.14 版本。
我不太确定 libpng 问题。当我执行locate libpng-config时,我得到了几次点击,一些带有libong-config12,一些带有libpng-config14,一些没有任何数字:
ayeroslaviz:~ayeroslaviz$locate libpng-config
/Applications/XAMPP/xamppfiles/bin/libpng-config
/Library/Frameworks/GTK+.framework/Versions/2.18.X11/Resources/bin/libpng-config
/opt/local/bin/libpng-config
/usr/X11/bin/libpng-config
/usr/local/bin/libpng-config
当执行 libpng-config
时,我得到: /usr/local/bin/libpng-config
code>
有没有办法卸载旧版本的 libpng 或更新正确版本的路径。不幸的是,我什至不确定这个警告的来源是什么,所以我希望我在这里提供了所有需要的信息。
我将不胜感激任何给我提示如何解决这个问题的人。
谢谢
A。
I have a problem on my mac when trying in R to produce png images.
I am getting this warnings:
libpng warning: Application built with libpng-1.2.26 but running with 1.5.2
I am running the R 2.14 version using the R-studio GUI.
I am not excatly sure about the libpng problem. When I am doing locate libpng-config I'm getting several hits, some with libong-config12, some with libpng-config14, some without nay numbers:
ayeroslaviz:~ ayeroslaviz$ locate libpng-config
/Applications/XAMPP/xamppfiles/bin/libpng-config
/Library/Frameworks/GTK+.framework/Versions/2.18.X11/Resources/bin/libpng-config
/opt/local/bin/libpng-config
/usr/X11/bin/libpng-config
/usr/local/bin/libpng-config
When doing which libpng-config
I'm getting: /usr/local/bin/libpng-config
Is there a way to uninstall older versions of libpng or update the paths to the right version. Unfortunately I am not even sure, what thesource of this warning, so I hope I gave here all the needed information.
I would be grateful for anyone who gives me a hint about how to solve this problem.
thanks
A.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
幸运的是,您使用的是 Mac,因此有一种更简单(但未记录)的方法。
请注意,您要保存的图像必须是当前活动的石英窗口。
Fortunately, you're using a Mac, so there's a simpler (but not documented) method.
Note that the image you want to save must be the currently active quartz window.
如果您的代码仍然有效,则不必担心。事实上,这是一条警告而不是一条错误消息,这意味着可能存在问题,而不是肯定存在问题。如果您不想看到警告,请将 R 代码包装在对
suppressMessages
的调用中。If your code still works, then don't worry about it. The fact this this is a warning rather than an error message means that there might be a problem, not that there definitely is a problem. IF you don't want to see the warning, wrap your R code in a call to
suppressMessages
.可能会出现此问题,因为 RStudio(或您在项目中使用的其他一些库)正在使用内置的 libpng 库 (v1.2),并且当应用程序运行时,系统中安装的版本是 v1.5:http://www.libpng.org/pub/png/pngfaq.html#mismatch。如果这就是问题所在,您可以尝试升级 RStudio libpng 库或降级系统 libpng 库。
This problem could occur because RStudio (or some other library you are using in your project) is using in-built libpng libraries (v1.2) and when the application run, the version installed in the system is v1.5: http://www.libpng.org/pub/png/pngfaq.html#mismatch. If this is the point, you could try to upgrade RStudio libpng libraries or downgrade system libpng ones.