Ubuntu 20.04安装fcrepo-service-activemq Karaf Feature报错求解决
Ubuntu 20.04安装Karaf Feature fcrepo-service-activemq失败的解决方法
问题场景
在Ubuntu 20.04系统中执行以下命令安装Karaf Feature:
/opt/karaf/bin/client feature:install fcrepo-service-activemq
触发以下错误:
Error executing command: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=fcrepo-service-activemq; type=karaf.feature; version="[5.0.0,5.0.0]"; filter="(&(osgi.identity=fcrepo-service-activemq)(type=karaf.feature)(version>=5.0.0)(version<=5.0.0))" [caused by: Unable to resolve fcrepo-service-activemq/5.0.0: missing requirement [fcrepo-service-activemq/5.0.0] osgi.identity; osgi.identity=activemq-camel; type=karaf.feature; version="[5.14.0,6.0.0)" [caused by: Unable to resolve activemq-camel/5.15.11: missing requirement [activemq-camel/5.15.11] osgi.identity; osgi.identity=org.apache.activemq.activemq-camel; type=osgi.bundle; version="[5.15.11,5.15.11]"; resolution:=mandatory [caused by: Unable to resolve org.apache.activemq.activemq-camel/5.15.11: missing requirement [org.apache.activemq.activemq-camel/5.15.11] osgi.wiring.package; filter="(&(osgi.wiring.package=org.springframework.jms.connection)(version>=4.0.0)(!(version>=6.0.0)))"]]]
错误核心:activemq-camel/5.15.11依赖的org.springframework.jms.connection包(版本范围4.0.0~6.0.0)缺失。
解决步骤
1. 安装Spring JMS Feature
先手动补装缺失的Spring JMS相关依赖:
/opt/karaf/bin/client feature:install spring-jms
2. 预安装指定版本的activemq-camel
按照错误提示的版本要求,先安装activemq-camel/5.15.11:
/opt/karaf/bin/client feature:install activemq-camel/5.15.11
如果这一步仍提示Spring版本不兼容,可指定安装兼容的Spring 4.x版本Feature:
/opt/karaf/bin/client feature:install spring/4.3.30.RELEASE
3. 重新安装目标Feature
完成依赖补全后,再次执行原安装命令:
/opt/karaf/bin/client feature:install fcrepo-service-activemq
4. 备选:添加缺失的Karaf仓库
若上述步骤仍无法获取依赖,添加ActiveMQ和Spring的官方Karaf仓库:
/opt/karaf/bin/client repo-add activemq https://repository.apache.org/content/groups/snapshots-group/org/apache/activemq/activemq-karaf/5.15.11/ /opt/karaf/bin/client repo-add spring https://repo.spring.io/release/org/springframework/karaf/spring-karaf/4.3.30.RELEASE/
添加后重新执行安装命令即可。
内容的提问来源于stack exchange,提问作者Frazer Nyambe
相关产品推荐
相关产品推荐

