I'm working on a Scientific Linux box and am trying to install Maven using the yum
command. Scientific Linux for those of you who do not know is based off of Red Hat Linux Enterprise Edition 6.
我正在开发一个科学的Linux系统,并尝试使用yum命令来安装Maven。对于那些不知道的人来说,科学Linux是基于Red Hat Linux Enterprise Edition 6。
I'd prefer to install Maven in a way that lent itself to easy updating, that is why I have shied away from simply going to the Apache Maven site and getting the files I need. Simply running yum
with root privileges was not enough. I used yum search maven
which returned "JPackage Utilities", which I tried to install only to get:
我更愿意安装Maven,以方便地更新,这就是为什么我不去Apache Maven站点并获取我需要的文件的原因。仅仅使用根权限运行yum是不够的。我使用了yum搜索maven,它返回了“JPackage实用程序”,我试图安装它来获得:
Package jpackage-utils-1.7.5-3.12.el6.noarch already installed and latest version
I was assuming that something like creating a new repo file something like /etc/yum.repos.d/maven.repo
would do the trick. I found a site suggesting that I point my maven.repo file to the URL http://www.jpackage.org/jpackage50.repo, however this seems to be a fix for an older version of Linux as it did not solve my problem
我假设创建一个新的repo文件类似于/etc/yum.repos.d/maven。repo会成功的。我发现了一个网站,建议我点我的maven。不过,这似乎是对旧版本Linux的修复,因为它并没有解决我的问题。
As always thanks in advance for any help or suggestions!
一如既往地感谢您的帮助或建议!
4 个解决方案
#1
19
The distro agnostic generic repo is what you want. As root, add a couple of the jpackage-generic repos to yum (two snippets below). Then perform a yum update and finally yum install maven2.
发行版不可知的通用回购是你想要的。作为根,在yum(以下两个代码片段)中添加一些jpackage-generic repos。然后执行一个yum更新,最后是yum安装maven2。
cat > /etc/yum.repos.d/jpackage-generic-free.repo << EOF
[jpackage-generic-free]
name=JPackage generic free
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/free/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
cat > /etc/yum.repos.d/jpackage-generic-devel.repo << EOF
[jpackage-generic-devel]
name=JPackage Generic Developer
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/devel/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
#2
10
I had all kinds of conflicts trying to use the JPackage repo with Scientific Linux 6.2, but I had much better luck with dchen's repo from the "Fedora People" unofficial repositories. The repo config I used is:
我有各种各样的冲突,试图用科学的Linux 6.2使用JPackage repo,但我在dchen的“Fedora People”非官方存储库中获得了更好的运气。我使用的repo配置是:
# Note: Replaced $releasever with 6Server since SL's "6.2" doesn't work
[epel-apache-maven]
name=maven from apache foundation.
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0
[epel-apache-maven-source]
name=maven from apache foundation. - Source
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=0
The package itself is called apache-maven
and installs maven 3.0.3.
该包本身称为apachemaven,并安装maven 3.0.3。
#3
5
This is more updated way:
这是更更新的方式:
curl http://www.jpackage.org/jpackage50.repo > /etc/yum.repos.d/jpackage.repo
yum update
yum install maven2
#4
4
Thanks Andy for his answer (on Jun 10, 2011). It gave me some hints. However, when I followed it, I got a lot of dependencies issues, including problems like these
感谢安迪的回答(2011年6月10日)。它给了我一些提示。然而,当我跟踪它时,我发现了很多依赖关系的问题,包括这些问题。
ERROR with rpm_check_debug vs depsolve:
rpmlib(FileDigests) is needed by plexus-container-default-1.0-0.a9s1.2.jpp6.noarch
rpmlib(FileDigests) is needed by aspectj-1.5.4-1.jpp6.noarch
rpmlib(FileDigests) is needed by rhino-1.7-1.r2.8.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-dom-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by easymock2-2.5.2-2.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-xpath-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by xmlbeans-2.4.0-3.jpp6.noarch
rpmlib(FileDigests) is needed by jtidy-7.0-0.V04aug2000r7_dev.2.jpp6.noarch
rpmlib(FileDigests) is needed by lucene-2.4.1-5.jpp6.noarch
rpmlib(FileDigests) is needed by aqute-bndlib-0.0.363-1.jpp6.noarch
Finally I realized the JPackage website actually has good and updated instruction. So I following these two pages and could finally installed maven2 on my machine.
最后,我意识到JPackage网站实际上有很好的和更新的指导。因此,我遵循这两页,终于可以在我的机器上安装了maven2。
Jpackage.org: Installation
Jpackage.org:安装
Jpackage.org: Using a Repository -- Yum
org:使用存储库——Yum。
#1
19
The distro agnostic generic repo is what you want. As root, add a couple of the jpackage-generic repos to yum (two snippets below). Then perform a yum update and finally yum install maven2.
发行版不可知的通用回购是你想要的。作为根,在yum(以下两个代码片段)中添加一些jpackage-generic repos。然后执行一个yum更新,最后是yum安装maven2。
cat > /etc/yum.repos.d/jpackage-generic-free.repo << EOF
[jpackage-generic-free]
name=JPackage generic free
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/free/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
cat > /etc/yum.repos.d/jpackage-generic-devel.repo << EOF
[jpackage-generic-devel]
name=JPackage Generic Developer
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/devel/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF
#2
10
I had all kinds of conflicts trying to use the JPackage repo with Scientific Linux 6.2, but I had much better luck with dchen's repo from the "Fedora People" unofficial repositories. The repo config I used is:
我有各种各样的冲突,试图用科学的Linux 6.2使用JPackage repo,但我在dchen的“Fedora People”非官方存储库中获得了更好的运气。我使用的repo配置是:
# Note: Replaced $releasever with 6Server since SL's "6.2" doesn't work
[epel-apache-maven]
name=maven from apache foundation.
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/$basearch/
enabled=1
skip_if_unavailable=1
gpgcheck=0
[epel-apache-maven-source]
name=maven from apache foundation. - Source
baseurl=http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-6Server/SRPMS
enabled=0
skip_if_unavailable=1
gpgcheck=0
The package itself is called apache-maven
and installs maven 3.0.3.
该包本身称为apachemaven,并安装maven 3.0.3。
#3
5
This is more updated way:
这是更更新的方式:
curl http://www.jpackage.org/jpackage50.repo > /etc/yum.repos.d/jpackage.repo
yum update
yum install maven2
#4
4
Thanks Andy for his answer (on Jun 10, 2011). It gave me some hints. However, when I followed it, I got a lot of dependencies issues, including problems like these
感谢安迪的回答(2011年6月10日)。它给了我一些提示。然而,当我跟踪它时,我发现了很多依赖关系的问题,包括这些问题。
ERROR with rpm_check_debug vs depsolve:
rpmlib(FileDigests) is needed by plexus-container-default-1.0-0.a9s1.2.jpp6.noarch
rpmlib(FileDigests) is needed by aspectj-1.5.4-1.jpp6.noarch
rpmlib(FileDigests) is needed by rhino-1.7-1.r2.8.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-dom-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by easymock2-2.5.2-2.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by saxon9-xpath-B.9.0.0.8-2.jpp6.noarch
rpmlib(FileDigests) is needed by xmlbeans-2.4.0-3.jpp6.noarch
rpmlib(FileDigests) is needed by jtidy-7.0-0.V04aug2000r7_dev.2.jpp6.noarch
rpmlib(FileDigests) is needed by lucene-2.4.1-5.jpp6.noarch
rpmlib(FileDigests) is needed by aqute-bndlib-0.0.363-1.jpp6.noarch
Finally I realized the JPackage website actually has good and updated instruction. So I following these two pages and could finally installed maven2 on my machine.
最后,我意识到JPackage网站实际上有很好的和更新的指导。因此,我遵循这两页,终于可以在我的机器上安装了maven2。
Jpackage.org: Installation
Jpackage.org:安装
Jpackage.org: Using a Repository -- Yum
org:使用存储库——Yum。