错误:软件包'ragg'的配置失败

x33g5p2x  于 2022-12-27  发布在  其他
关注(0)|答案(2)|浏览(357)

会话信息

sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value                       
#>  version  R version 4.1.0 (2021-05-18)
#>  os       Ubuntu 20.04.2 LTS          
#>  system   x86_64, linux-gnu           
#>  ui       X11                         
#>  language en_GB:en                    
#>  collate  en_GB.UTF-8                 
#>  ctype    en_GB.UTF-8                 
#>  tz       Europe/Stockholm            
#>  date     2021-08-17

这个问题发生在一个conda环境中。安装了建议的linux库(见下,在同一个conda环境中运行)。

sudo apt-get install -y libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libjpeg-dev is already the newest version (8c-2ubuntu8).
libpng-dev is already the newest version (1.6.37-2).
libfreetype6-dev is already the newest version (2.10.1-2ubuntu0.1).
libtiff5-dev is already the newest version (4.1.0+git191117-2ubuntu0.20.04.1).
0 to upgrade, 0 to newly install, 0 to remove and 26 not to upgrade.

ragg安装在conda env之外可以正常工作。我的猜测是,当从conda env安装时,它找不到指向某个东西的路径。有什么提示吗?

fruv7luv

fruv7luv1#

解决方案在日志中:

Configuration failed to find one of freetype2 libpng libtiff-4. Try installing:
 * deb: libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev (Debian, Ubuntu, etc)
 * rpm: freetype-devel libpng-devel libtiff-devel libjpeg-turbo-devel (Fedora, CentOS, RHEL)
 * csw: libfreetype_dev libpng16_dev libtiff_dev libjpeg_dev (Solaris)

请安装这些软件包,然后重试。

u0njafvf

u0njafvf2#

它看起来像是连接到this question answer的东西。我遇到了同样的问题,当我试图安装“ragg”包内我的conda env,和建议的修复日志(由@BlackBear答案提到)不是问题的真实的原因,问题的原因显示在下面的日志:

-------------------------- [ERROR MESSAGE] ---------------------------
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/features.h:361,
                 from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/limits.h:27,
                 from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:194,
                 from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/syslimits.h:7,
                 from /home/roy/miniconda3/envs/r-4.1/lib/gcc/x86_64-conda-linux-gnu/9.3.0/include-fixed/limits.h:34,
                 from /usr/include/libpng16/pngconf.h:31,
                 from /usr/include/libpng16/png.h:339,
                 from <stdin>:2:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:492:49: error: missing binary operator before token "("
  492 | #if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
      |                                                 ^
In file included from /home/roy/miniconda3/envs/r-4.1/x86_64-conda-linux-gnu/sysroot/usr/include/stdio.h:932,
                 from /usr/include/libpng16/pngconf.h:46,
                 from /usr/include/libpng16/png.h:339,
                 from <stdin>:2:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:228:17: error: missing binary operator before token "("
  228 | #if __GLIBC_USE (DEPRECATED_GETS)
      |                 ^
--------------------------------------------------------------------

这可能是某种程度上连接到宏定义混乱。我不是一个大Maven在glibc和其他事情,对我来说,建议从@MrFlick在评论中的问题,安装包直接通过conda工作(mamba install -c conda-forge r-ragg

相关问题