nio4r gem 无法使用本机扩展构建尝试安装 redmine_knowledgebase 插件

如何解决nio4r gem 无法使用本机扩展构建尝试安装 redmine_knowledgebase 插件

从 Ubuntu 服务器 20.04 上的最新 Linux bitnami 安装程序 (4.2) 下载并安装 Redmine。 安装没有问题,redmine 已启动并正常运行:

  Redmine version                4.2.0.stable
  Ruby version                   2.5.8-p224 (2020-03-31) [x86_64-linux]
  Rails version                  5.2.5
  Environment                    production
  Database adapter               Mysql2

但是,当我尝试安装知识库插件时,nio4r gem 出现编译器构建错误:

bruno@Vostro:~/redmine-4.1.1-8/apps/redmine/htdocs/plugins$ git clone git://github.com/alexbevi/redmine_knowledgebase.git

bundle install --no-deployment

依赖 tzinfo-data (>= 0) 将不会被 Bundler 安装的任何平台使用。 Bundler 正在为 ruby​​ 安装,但依赖项仅适用于 x86-mingw32、x64-mingw32、x86-mswin32。要将这些平台添加到包中,请运行 bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32。 依赖 ffi (>= 0) 将不会被 Bundler 安装的任何平台使用。 Bundler 正在为 ruby​​ 安装,但依赖项仅适用于 x86-mingw32、x64-mingw32、x86-mswin32。要将这些平台添加到包中,请运行 bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32。

Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Fetching rake 13.0.3
Installing rake 13.0.3
Fetching concurrent-ruby 1.1.8
Installing concurrent-ruby 1.1.8
Fetching i18n 1.8.9
Installing i18n 1.8.9
Fetching minitest 5.14.4
Installing minitest 5.14.4
Using thread_safe 0.3.6
Fetching tzinfo 1.2.9
Installing tzinfo 1.2.9
Fetching activesupport 5.2.5
Installing activesupport 5.2.5
Using builder 3.2.4
Fetching erubi 1.10.0
Installing erubi 1.10.0
Fetching mini_portile2 2.5.0
Installing mini_portile2 2.5.0
Fetching racc 1.5.2
Installing racc 1.5.2 with native extensions
Fetching nokogiri 1.11.2 (x86_64-linux)
Installing nokogiri 1.11.2 (x86_64-linux)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Fetching loofah 2.9.0
Installing loofah 2.9.0
Using rails-html-sanitizer 1.3.0
Fetching actionview 5.2.5
Installing actionview 5.2.5
Using rack 2.2.3
Fetching rack-test 1.1.0
Installing rack-test 1.1.0
Fetching actionpack 5.2.5
Installing actionpack 5.2.5
Fetching nio4r 2.5.7

Installing nio4r 2.5.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/bruno/redmine-4.2.0-0/ruby/lib/ruby/gems/2.5.0/gems/nio4r-2.5.7/ext/nio4r
/home/bruno/redmine-4.2.0-0/ruby/bin/ruby -r ./siteconf20210329-18642-1yfhj63.rb extconf.rb
checking for unistd.h... yes
checking for linux/aio_abi.h... yes
checking for linux/io_uring.h... yes
checking for sys/select.h... yes
checking for port_event_t in poll.h... no
checking for sys/epoll.h... yes
checking for sys/event.h... no
checking for port_event_t in port.h... no
checking for sys/resource.h... yes
creating Makefile

current directory: /home/bruno/redmine-4.2.0-0/ruby/lib/ruby/gems/2.5.0/gems/nio4r-2.5.7/ext/nio4r
make "DESTDIR=" clean

current directory: /home/bruno/redmine-4.2.0-0/ruby/lib/ruby/gems/2.5.0/gems/nio4r-2.5.7/ext/nio4r
make "DESTDIR="
compiling bytebuffer.c
compiling monitor.c
compiling nio4r_ext.c
In file included from nio4r_ext.c:6:
../libev/ev.c:2136:31: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’
2136 | EV_API_DECL struct ev_loop ev_default_loop_ptr = 0; / needs to be initialised to make it a definition
despite extern */
| ^~~~~~~~~~~~~~~~~~~
../libev/ev.c: In function ‘ev_time’:
../libev/ev.c:2172:7: internal compiler error: Illegal instruction
2172 | return EV_TS_GET (ts);
| ^~~~~~
Please submit a full bug report,with preprocessed source if appropriate.
See for instructions.
make: *** [Makefile:243: nio4r_ext.o] Error 1

make failed,exit code 2

Gem files will remain installed in /home/bruno/redmine-4.2.0-0/ruby/lib/ruby/gems/2.5.0/gems/nio4r-2.5.7 for
inspection.
Results logged to
/home/bruno/redmine-4.2.0-0/ruby/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0-static/nio4r-2.5.7/gem_make.out_

An error occurred while installing nio4r (2.5.7),and Bundler cannot continue.
Make sure that gem install nio4r -v '2.5.7' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile:
redmine_crm was resolved to 0.0.54,which depends on
rails was resolved to 5.2.5,which depends on
actioncable was resolved to 5.2.5,which depends on nio4r

在捆绑之前尝试直接安装 gem nio4r 时,同样的编译器构建错误:

gem install nio4r -v '2.5.7' --source 'https://rubygems.org/' 

.../gems/2.5.0/extensions/x86_64-linux/2.5.0-static/nio4r-2.5.7/mkmf.log 错误日志:

...
conftest.c:6:9: error: unknown type name ‘port_event_t’
...
conftest.c:3:10: fatal error: sys/event.h: No such file or directory
...
conftest.c:3:10: fatal error: port.h: No such file or directory
...

任何见解? 谢谢

解决方法

在加载 Bitnami 控制台后,我已经能够使用 Bitnami Redmine 4.1.X(知识库插件不正式支持 Redmine 4.2)和插件的 installation’s commands 在新的 Ubuntu 20 实例中安装该插件。您能否按照以下命令尝试安装插件:

cd INSTALLDIR
./use_redmine
. ./scripts/setenv.sh
cd apps/redmine/htdocs/
bundle install
bundle exec ./bin/rake redmine:plugins:migrate NAME=redmine_knowledgebase RAILS_ENV=production
INSTALLDIR/ctlscript.sh restart

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 <select id="xxx"> SELECT di.id, di.name, di.work_type, di.updated... <where> <if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 <property name="dynamic.classpath" value="tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams['font.sans-serif'] = ['SimHei'] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -> systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping("/hires") public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate<String
使用vite构建项目报错 C:\Users\ychen\work>npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-