I am trying to install curl via stack using stack install curl-1.3.8 -v, and I am stuck with the following error:
2019-10-06 19:01:22.673216: [info] curl> Configuring curl-1.3.8...
2019-10-06 19:01:22.910469: [warn] curl> setup: Missing dependency on a foreign library:
2019-10-06 19:01:22.910594: [warn] curl> * Missing (or bad) C library: curl
2019-10-06 19:01:22.910679: [warn] curl> This problem can usually be solved by installing the system package that
2019-10-06 19:01:22.910776: [warn] curl> provides this library (you may need the "-dev" version). If the library is
2019-10-06 19:01:22.910892: [warn] curl> already installed but in a non-standard location then you can use the flags
2019-10-06 19:01:22.910970: [warn] curl> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
2019-10-06 19:01:22.911056: [warn] curl> library file does exist, it may contain errors that are caught by the C
2019-10-06 19:01:22.911192: [warn] curl> compiler at the preprocessing stage. In this case you can re-run configure
2019-10-06 19:01:22.911261: [warn] curl> with the verbosity flag -v3 to see the error messages.
2019-10-06 19:01:22.911335: [warn] curl>
2019-10-06 19:01:22.918187: [error]
-- While building package curl-1.3.8 using:
/tmp/stack13678/curl-1.3.8/.stack-work/dist/x86_64-linux/Cabal-
2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1
configure --user --package-db=clear --package-db=global --package-db=/home
/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/pkgdb --libdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/lib --bindir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/bin --datadir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/share --libexecdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/libexec --sysconfdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/etc --docdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/doc/curl-1.3.8 --htmldir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --haddockdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --dependency=base=base-4.11.1.0
--dependency=bytestring=bytestring-0.10.8.2
--dependency=containers=containers-0.5.11.0 -fnew-base --exact-configuration
--ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Any idea how can I fix it?
Stack version: 2.1.3
Description: Ubuntu 19.04
As the error message you got says, "This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)". In your case, you need a libcurl-dev package. Depending on your preferred TLS library, run one of sudo apt-get install libcurl4-openssl-dev, sudo apt-get install libcurl4-nss-dev, or sudo apt-get install libcurl4-gnutls-dev.
Related
I am building a sbt application on Spark v2.2.0-rc1. Since, this version of Spark is not available on Maven Repository, so I downloaded it from Spark's GitHub repository and tried to publish it locally, so, that I can compile my app with Spark v2.2.0-rc1. But, while doing sbt publishLocal I am getting following exception:
$ sbt publishLocal
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.postgresql#postgresql;9.4.1207.jre7: several problems occurred while resolving dependency: org.postgresql#postgresql;9.4.1207.jre7 {test=[default(compile)]}:
[warn] org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
[warn] org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info] :: delivering :: org.apache.spark#spark-streaming-flume-assembly_2.11;2.2.0 :: 2.2.0 :: release :: Sun May 28 14:05:05 GMT 2017
[warn]
[warn] Note: Unresolved dependencies path:
[warn] org.postgresql:postgresql:9.4.1207.jre7 ((com.typesafe.sbt.pom.MavenHelper) MavenHelper.scala#L76)
[warn] +- org.apache.spark:spark-sql_2.11:2.2.0
[info] delivering ivy file to /home/user/Softwares/spark-2.2.0-rc1/external/flume-assembly/target/scala-2.11/ivy-2.2.0.xml
...
[info] published ivy to /home/user/.ivy2/local/org.apache.spark/spark-catalyst_2.11/2.2.0/ivys/ivy.xml
sbt.ResolveException: unresolved dependency: org.postgresql#postgresql;9.4.1207.jre7: several problems occurred while resolving dependency: org.postgresql#postgresql;9.4.1207.jre7 {test=[default(compile)]}:
org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:313)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:191)
at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:168)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.updateEither(IvyActions.scala:168)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1481)
at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1477)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1512)
at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$121.apply(Defaults.scala:1510)
at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:37)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1515)
at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1509)
at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:60)
at sbt.Classpaths$.cachedUpdate(Defaults.scala:1532)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1459)
at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1411)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
[error] (sql/*:update) sbt.ResolveException: unresolved dependency: org.postgresql#postgresql;9.4.1207.jre7: several problems occurred while resolving dependency: org.postgresql#postgresql;9.4.1207.jre7 {test=[default(compile)]}:
[error] org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
[error] org.postgresql#postgresql;9.4.1207.jre7!postgresql.pom(pom.original) origin location must be absolute: file:/home/user/.m2/repository/org/postgresql/postgresql/9.4.1207.jre7/postgresql-9.4.1207.jre7.pom
[error] Total time: 240 s, completed May 28, 2017 2:08:01 PM
However, when I run mvn install -DskipTests=true, it runs perfectly fine, but sbt publishLocal gives exception. Since, I have to build my app using sbt, I want spark v2.2.0 to be on .ivy2 folder and not in .m2 folder.
Can anyone help me out on this one ?
Use Maven to build Spark (the official way) as follows:
./build/mvn -Phadoop-2.7,yarn,mesos,hive,hive-thriftserver -DskipTests clean install
And once you've got the jars in Maven repo, define a resolver in build.sbt to use Maven's local repository.
resolvers += Resolver.mavenLocal
See Resolvers in sbt's official documentation.
That does not answer what you're facing the issue with PostgreSQL JDBC driver, but that's of less need I believe.
I don't understand why sbt can't resolve a dependency. All of a sudden today I've been getting this error:
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] :: com.amazonaws#aws-java-sdk-core;1.11.106: not found
sbt.last.log reports:
[warn] ==== maven-central: tried
[warn] http://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.106/aws-java-sdk-core-1.11.106.pom
Yet I can web-browse to that folder and see the files sbt should find:
http://repo1.maven.org/maven2/com/amazonaws/aws-java-sdk-core/1.11.106/
com/amazonaws/aws-java-sdk-core/1.11.106
...
aws-java-sdk-core-1.11.106.jar 2017-03-20 23:44 840754
...
aws-java-sdk-core-1.11.106.pom 2017-03-20 23:44 4039
Use version 0.13.13 of SBT, it works.
I just started working with Play 2 and Heroku, but when I tried to deployed the application I got an error. I tried doing an sbt clean compile and this is what I got:
Marcelos-MacBook-Pro:guzmanenergy marcelo$ sbt clean compile
Marcelos-MacBook-Pro:guzmanenergy marcelo$ sbt clean compile
[info] Loading project definition from /projects/guzmanenergy/project
[warn] [NOT FOUND ] xml-apis#xml-apis;1.0.b2!xml-apis.jar (146ms)
[warn] ==== Typesafe repository: tried
[warn] http://repo.typesafe.com/typesafe/releases/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: FAILED DOWNLOADS ::
[warn] :: ^ see resolution messages for details ^ ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: xml-apis#xml-apis;1.0.b2!xml-apis.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/projects/guzmanenergy/project/}default-de2d7b/*:update: sbt.ResolveException: download failed: xml-apis#xml-apis;1.0.b2!xml-apis.ja
Try adding the line
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/repo1/"
to your project/plugins.sbt file. Make sure there is a white line between every line, check the guide for more info
Got a fresh Homebrew install of scala, giter8, sbt (0.11.3), and maven and everything checks out for the most part. brew doctor shows just known mods I've made by installing pcre and python 2.7 manually. When I get the play-scala template and then run it for the first time, I get the following unresolved deps on slf4j
# sudo sbt run
...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
Running clean, reload, update manually:
# sudo sbt
[info] Loading project definition from /Users/homedir/typesafe/my_app/project
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/)
[my_app] $ clean
[success] Total time: 0 s, completed Aug 15, 2012 7:23:10 AM
[my_app] $ reload
[info] Loading project definition from /Users/homedir/typesafe/my_app/project
[info] Set current project to my_app (in build file:/Users/homedir/typesafe/my_app/)
[my_app] $ update
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[error] {file:/Users/homedir/typesafe/my_app/}my_app/:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile
[error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
[error] Total time: 7 s, completed Aug 15, 2012 7:23:23 AM
What is the proper way to prevent this? Shouldn't these deps be downloaded during initialization?
Thanks!
Thanks to this question I ended up deleting ~/.m2 and ~/.ivy2, then did clean, update, reload. Subsequently everything worked. The update command successfully retrieved slf4j:
[my_app] $ update
[info] Updating {file:/Users/homedir/typesafe/my_app/}my_app...
[info] downloading http://repo.typesafe.com/typesafe/releases/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar ...
[info] [SUCCESSFUL ] org.slf4j#slf4j-api;1.6.1!slf4j-api.jar (1481ms)
Reading this lead me to doing the task before pushing/resolving.
I've added "com.amazonaws" % "dynamodb-titan100-storage-backend" % "1.0.0" to my dependencies and the build broke because of com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0): not found. I've fixed this by adding mavenLocal resolver(I have built dynamodb-titan100-storage-backend localy earlier) but it is not the best solution, I think.
dynamodb-titan100-storage-backend has additional repository called "AWS DynamoDB Local Release Repository" in pom.xml pointing to http://dynamodb-local.s3-website-us-west-2.amazonaws.com/release but adding it as sbt resolver doesn't fix the problem.
My question is: why this repostiry works with maven but does not with sbt?
Link to pom.xml
Part of sbt log:
[info] Resolving com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0) ...
[warn] module not found: com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0)
[warn] ==== local: tried
[warn] /home/wpitula/.ivy2/local/com.amazonaws/DynamoDBLocal/[revision]/ivys/ivy.xml
[warn] ==== fedora: tried
[warn] file:/usr/share/sbt/ivy-local/com.amazonaws/DynamoDBLocal/[revision]/ivy.xml
[warn] ==== public: tried
[warn] https://repo1.maven.org/maven2/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[warn] ==== sonatype-snapshots: tried
[warn] https://oss.sonatype.org/content/repositories/snapshots/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[warn] ==== DynamoDbLocal: tried
[warn] http://dynamodb-local.s3-website-us-west-2.amazonaws.com/release/com/amazonaws/DynamoDBLocal/[revision]/DynamoDBLocal-[revision].pom
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.amazonaws#DynamoDBLocal;[1.10.5.1, 2.0.0): not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
The problem was likely in a wrong type of the SBT resolver. You should use a Maven-repository resolver like this:
resolvers += "DynamoDBLocal" at "https://s3-us-west-2.amazonaws.com/dynamodb-local/release"