尝试在12.04精确构建的Ubuntu中穿越整个Cabal依赖地狱,我一直在进展缓慢。
我的第一个bash命令
cabal install --allow-newer
在一长串新软件包的底部产生以下消息:
cabal: The following packages are likely to be broken by the reinstalls: regex-posix-0.95.1 regex-compat-0.95.1 Use `--force-reinstalls` if you want to install anyway.
(注意:从未运行强制重新安装。)
如何修复这些软件包并完成安装cabal的过程? 我必须留在12.04并且cabal已经更新。
cabal install ad --reorder-goals
最终安装它。
然而,我现在仍然没有处于阴谋之下,因为我现在必须处理:
cabal:至少缺少以下依赖项:aeson -any,json-schema -any,monad-logger -any,mtl -any,persistent -any,persistent-postgresql == 2.1.6,persistent-template - any,rest-core -any,rest-snap -any,snap-core -any,snap-server -any,text -any"
当我尝试执行cabal build
更新:所需的依赖项列表缩小为: monad-logger,persistent,(cabal安装程序的好名称。) persistant-postgresql == 2.1.6 '永久模板 其余的按扣 卡芯 卡扣服务器
除了persistant-postgresql之外,任何版本都可以使用。
更新2:好消息,运行sudo apt-get install libghc-zlib-dev
揭开一个有趣的障碍。
按照此问题的其中一个答案中的建议尝试:Question
安装libghc-zlib-bindings-dev,安装好了,和libghc-zlib-dev。
zlib是现在正在使用的依赖项。一旦安装进度将继续。
libghc-zlib-dev
安装尝试的当前警告:
警告:请检查您的区域设置: LANGUAGE =(未设置), LC_ALL =(未设置), LANG =" en_US.UTF-8 支持并安装在您的系统上。
也
perl:警告:回退到标准语言环境(" C")。
显示。
也许这可以帮助我们深入研究调查。
我们必须彻底摆脱阴谋。
很确定这是种植红旗的地方:
#include" zlib.h"
^
编译终止。 setup-Simple-Cabal-1.22.2.0-x86_64-linux-ghc-7.10.1:缺少对>的依赖性一个 外国图书馆: *缺少(或坏)头文件:zlib.h *缺少C库:z
我希望这个网站有自动Ctrl - C Ctrl -V格式化,这有多棒?
答案 0 :(得分:1)
看起来您正在尝试构建一个软件包,问题在于它有很多依赖项。
安装所有依赖项的最佳方式(因为"构建"与"安装"不会找到解决方案来安装所有依赖项)只是为了(最好在沙盒中)运行Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List) throws java.lang.Exception; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webSecurityConfig': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.core.userdetails.UserDetailsService javabeat.net.springboot.config.WebSecurityConfig.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySpringUserDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private final javabeat.net.springboot.service.UserService javabeat.net.springboot.service.MySpringUserDetailsService.userService; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl' defined in URL [jar:file:F:\new-spring-boot\target\example-spring-boot-rest-1.0-SNAPSHOT.war!/WEB-INF/classes!/javabeat/net/springboot/service/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [javabeat.net.springboot.dao.UserRepository]: : Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#188ad80b' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#188ad80b': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(org.springframework.orm.jpa.JpaVendorAdapter)] threw exception; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#188ad80b' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#188ad80b': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.entityManagerFactory(org.springframework.orm.jpa.JpaVendorAdapter)] threw exception; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [javax.sql.DataSource] is defined
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
。这也将同时解决所有这些问题,而不是一个接一个地做出不相容的本地选择...