首页 > 解决方案 > 在 Windows 10 上的 ubuntu 20.04 WSL 上安装 rmagick gem

问题描述

我正在 Windows 10 上的 ubuntu 20.04 WSL 上安装 rmagick gem,出现以下错误

make "DESTDIR="
compiling rmagick.c
compiling rmdraw.c
compiling rmenum.c
compiling rmfill.c
compiling rmilist.c
compiling rmimage.c
rmimage.c: In function ‘Image_gray_q’:
rmimage.c:7552:32: error: ‘IsGrayImage’ undeclared (first use in this function); did you mean ‘DrawImage’?
 7552 |     return has_attribute(self, IsGrayImage);
      |                                ^~~~~~~~~~~
      |                                DrawImage
rmimage.c:7552:32: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:245: rmimage.o] Error 1

make failed, exit code 2

请有任何帮助

标签: ruby-on-railsrubyubuntuwindows-subsystem-for-linux

解决方案


似乎安装更新版本会起作用,请尝试 7.0.10-33。

原因是早期版本中存在一些混淆的编译标志,详情请参见 github.com/rmagick/rmagick/issues/1228


推荐阅读