libpng 警告:使用 libpng-1.2.26 构建但使用 1.5.2 运行的应用程序

发布于 2024-12-16 18:32:05 字数 904 浏览 2 评论 0原文

当我尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦晓ヶ微光ヅ倾城 2024-12-23 18:32:05

幸运的是,您使用的是 Mac,因此有一种更简单(但未记录)的方法。

quartz.save('my_filename.png', type='png') 

请注意,您要保存的图像必须是当前活动的石英窗口。

Fortunately, you're using a Mac, so there's a simpler (but not documented) method.

quartz.save('my_filename.png', type='png') 

Note that the image you want to save must be the currently active quartz window.

多孤肩上扛 2024-12-23 18:32:05

如果您的代码仍然有效,则不必担心。事实上,这是一条警告而不是一条错误消息,这意味着可能存在问题,而不是肯定存在问题。如果您不想看到警告,请将 R 代码包装在对 suppressMessages 的调用中。

suppressMessages(code_to_call_libpng)

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.

suppressMessages(code_to_call_libpng)
断舍离 2024-12-23 18:32:05

可能会出现此问题,因为 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文