RTFM

[Read This Fine Material] from Joshua Hoblitt

hack to work around the puppet package type pip provider being broken on RHEL6

| 0 comments

It appears that the pip provider for the package type on RHEL6 / $::osfamily = redhat seems to think that the pip utility (provided by the python-pip rpm) should be, and logically it would be, named pip. It’s actually installed as /usr/bin/pip-python, likely due to some sort of concerns over a naming collision with another package. A quick scan of the puppet redmine doesn’t show any open tickets on this issue.

Error: bundle install --without development test postgres --deployment returned 1 instead of one of [0]
Error: /Stage[main]/Gitlab::Server/Exec[Install gitlab]/returns: change from notrun to 0 failed: bundle install --without development test postgres --deployment returned 1 instead of one of [0]
Error: Could not set 'present' on ensure: Could not locate the pip command. at 26:/home/jhoblitt/github/gitlab/manifests/server.pp
Error: Could not set 'present' on ensure: Could not locate the pip command. at 26:/home/jhoblitt/github/gitlab/manifests/server.pp
Wrapped exception:
Could not locate the pip command.
Error: /Stage[main]/Gitlab::Server/Package[pygments]/ensure: change from absent to present failed: Could not set 'present' on ensure: Could not locate the pip command. at 26:/home/jhoblitt/github/gitlab/manifests/server.pp

A quick and not as dirty as just installing a global shell alias or a manully created symlink is to use the alternatives utility.

alternatives --install /usr/bin/pip pip /usr/bin/pip-python 1

Leave a Reply