2

我按照以下说明安装 PyLucene,如下所示:

https://lucene.apache.org/pylucene/install.html

问题是当我制作时,常春藤无法检索某些东西并且它失败了。

[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured

是否可以手动下载并使其正常工作,因为我已经下载了其他所有内容。

我不知道为什么这不起作用,我在我的大学代理服务器后面,我对代理服务器无能为力。

$make
cd lucene-java-4.9.0/lucene; (JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 /usr/bin/ant ivy-availability-check || JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 /usr/bin/ant ivy-bootstrap)
Buildfile: /home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/build.xml

ivy-availability-check:

ivy-fail:

BUILD SUCCESSFUL
Total time: 0 seconds
cd lucene-java-4.9.0/lucene/memory; JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 /usr/bin/ant -Dversion=4.9.0
Buildfile: /home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/memory/build.xml
 [echo] Building memory...

check-queryparser-uptodate:

jar-queryparser:
     [echo] Building queryparser...

check-queries-uptodate:

jar-queries:

check-sandbox-uptodate:

jar-sandbox:
     [echo] Building sandbox...

ivy-availability-check:
     [echo] Building sandbox...

ivy-fail:

ivy-configure:
[ivy:configure] :: Apache Ivy 2.4.0 - 20141213170938 ::   http://ant.apache.org/ivy/ ::
[ivy:configure] :: loading settings :: file = /home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/ivy-settings.xml

resolve:
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.

[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] You probably access the destination server through a proxy server that is not well configured.
[ivy:retrieve] 
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]  Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host repo1.maven.org not found. url=https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host repository.cloudera.com not found. url=http://repository.cloudera.com/artifactory/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host repository.cloudera.com not found. url=http://repository.cloudera.com/artifactory/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host repository.cloudera.com not found. url=http://repository.cloudera.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host repository.cloudera.com not found. url=http://repository.cloudera.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host oss.sonatype.org not found. url=http://oss.sonatype.org/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host oss.sonatype.org not found. url=http://oss.sonatype.org/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host maven.restlet.org not found. url=http://maven.restlet.org/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host maven.restlet.org not found. url=http://maven.restlet.org/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host maven.tmatesoft.com not found. url=http://maven.tmatesoft.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host maven.tmatesoft.com not found. url=http://maven.tmatesoft.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  Host uk.maven.org not found. url=http://uk.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]  Host uk.maven.org not found. url=http://uk.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]      module not found: jakarta-regexp#jakarta-regexp;1.4
[ivy:retrieve]  ==== local: tried
[ivy:retrieve]    /home/qcsproject/.ivy2/local/jakarta-regexp/jakarta-regexp/1.4/ivys/ivy.xml
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    /home/qcsproject/.ivy2/local/jakarta-regexp/jakarta-regexp/1.4/jars/jakarta-regexp.jar
[ivy:retrieve]  ==== shared: tried
[ivy:retrieve]    /home/qcsproject/.ivy2/shared/jakarta-regexp/jakarta-regexp/1.4/ivys/ivy.xml
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    /home/qcsproject/.ivy2/shared/jakarta-regexp/jakarta-regexp/1.4/jars/jakarta-regexp.jar
[ivy:retrieve]  ==== public: tried
[ivy:retrieve]    https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    https://repo1.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== cloudera: tried
[ivy:retrieve]    http://repository.cloudera.com/artifactory/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
 [ivy:retrieve]       http://repository.cloudera.com/artifactory/repo/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== releases.cloudera.com: tried
[ivy:retrieve]    http://repository.cloudera.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy :retrieve]       -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    http://repository.cloudera.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== sonatype-releases: tried
[ivy :retrieve]       http://oss.sonatype.org/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    http://oss.sonatype.org/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== maven.restlet.org: tried
[ivy:retrieve]    http://maven.restlet.org/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    http://maven.restlet.org/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== svnkit-releases: tried
[ivy:retrieve]    http://maven.tmatesoft.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    http://maven.tmatesoft.com/content/repositories/releases/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]  ==== working-chinese-mirror: tried
[ivy:retrieve]    http://uk.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.pom
[ivy:retrieve]    -- artifact jakarta-regexp#jakarta-regexp;1.4!jakarta-regexp.jar:
[ivy:retrieve]    http://uk.maven.org/maven2/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      :: jakarta-regexp#jakarta-regexp;1.4: not found
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] 
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
/home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/module-build.xml:118: The following error occurred while executing this line:
/home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/module-build.xml:550: The following error occurred while executing this line:
/home/qcsproject/Downloads/pylucene-4.9.0-0/lucene-java-4.9.0/lucene/common-build.xml:388: impossible to resolve dependencies:
resolve failed - see output for details

Total time: 2 minutes 1 second
make: *** [lucene-java-4.9.0/lucene/build/memory/lucene-memory-4.9.0.jar] Error 1
4

2 回答 2

2

我为此苦苦挣扎了很长时间。我尝试了很多肮脏的技巧,比如这个用户

基本上,ant 需要构建的文件 ivy-2.3.0.jar 似乎在源代码中包含一个 com/trends 目录,因为它是从 pylucene 安装程序中的配置文件预定义的 maven repo 下载的。就我而言,这些趋势类触发了很多 java 小程序警报实例,要求允许连接到常春藤......

此外,您可能缺少导出 ANT_HOME 变量

所以总结一下:

导出 ANT_HOME,例如在 OS X 中:

export ANT_HOME=/usr/local/Cellar/ant/1.9.6/libexec
export PATH=$PATH:$ANT_HOME/bin

使用干净下载的 ivy jar。从此处下载压缩的 src ,解压缩 jar 并将其“放置”在所需的 ant lib 目录中,例如通过创建符号链接。如果干净版本比所需版本更新,则没有问题。例如,再次在 OS X 中:

ln -s <where you have ivy-2.4.0.jar> ~/.ant/lib/ivy-2.3.0.jar
于 2015-11-06T19:32:32.103 回答
0

Ant 需要了解您的代理设置。

https://ant.apache.org/manual/proxy.html

引用文章:

对于重击

export ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

对于 tcsh/csh:

setenv ANT_OPTS "-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

于 2019-04-10T16:46:47.513 回答