简体   繁体   中英

Ansible install fails on RHEL 7

yum install ansible 

fails on RHEL 7 because of the following dependency error

Error: Package: python-jinja2-2.2.1-1.el6.rf.x86_64 (rpmforge)
           Requires: python(abi) = 2.6
           Installed: python-2.7.5-16.el7.x86_64 (installed)
               python(abi) = 2.7
               python(abi) = 2.7
           Available: python34-3.4.3-4.el7.x86_64 (epel)
               python(abi) = 3.4
Error: Package: python-jinja2-2.2.1-1.el6.rf.x86_64 (rpmforge)
           Requires: libpython2.6.so.1.0()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I have the latest python, but ansible dependency requires older version. How do i resolve this issue. I am not able to build ansible from sources for the very same reason.

Please provide suggestions.

You have at this moment a dependence error, the best way to install ansible is by pip.

first install this:

# yum install python-dev python-pip

then install:

# pip install ansible

Yum is not the best way.

The python-jinja2 package can be found in the optional-rpms repository. So if you are running RHEL7, you can do something like:

# subscription-manager repos --enable rhel-7-desktop-optional-rpms

Or you can set notify-only=0 in /etc/yum/pluginconf.d/search-disabled-repos.conf .

Then try yum install ansible again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM