Error: Package requires python27

We've made some changes to sd-agent which means that the minimum required version of python is 2.7 from agent v2.2.0 onwards. CentOS/RHEL 6 does not ship with python 2.7 so we've provided the following to help you resolve this issue and update your sd-agent installs. 

Error

If you don't have python 2.7 installed on your server you will see the following error message when attempting a yum update: 

Resolving Dependencies
--> Running transaction check
---> Package sd-agent.x86_64 0:2.1.6-1.el6 will be obsoleted
---> Package sd-agent-forwarder.noarch 0:2.2.0-1.el6 will be obsoleting
--> Processing Dependency: sd-agent >= 2.2.0 for package: sd-agent-forwarder-2.2.0-1.el6.noarch
--> Processing Dependency: /usr/share/python/sd-agent/bin/python for package: sd-agent-forwarder-2.2.0-1.el6.noarch
--> Running transaction check
---> Package sd-agent.x86_64 0:2.1.6-1.el6 will be updated
---> Package sd-agent.x86_64 0:2.2.0-1.el6 will be an update
--> Processing Dependency: sd-agent-sd-cpu-stats for package: sd-agent-2.2.0-1.el6.x86_64
--> Processing Dependency: sd-agent-network for package: sd-agent-2.2.0-1.el6.x86_64
--> Processing Dependency: sd-agent-disk for package: sd-agent-2.2.0-1.el6.x86_64
--> Processing Dependency: python27 for package: sd-agent-2.2.0-1.el6.x86_64
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: sd-agent-2.2.0-1.el6.x86_64
--> Running transaction check
---> Package sd-agent.x86_64 0:2.2.0-1.el6 will be an update
--> Processing Dependency: python27 for package: sd-agent-2.2.0-1.el6.x86_64
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: sd-agent-2.2.0-1.el6.x86_64
---> Package sd-agent-disk.noarch 0:2.2.0-4.el6 will be installed
---> Package sd-agent-network.noarch 0:2.2.0-1.el6 will be installed
---> Package sd-agent-sd-cpu-stats.noarch 0:2.2.0-1.el6 will be installed
--> Finished Dependency Resolution
Error: Package: sd-agent-2.2.0-1.el6.x86_64 (server-density)
           Requires: python27
Error: Package: sd-agent-2.2.0-1.el6.x86_64 (server-density)
           Requires: libpython2.7.so.1.0()(64bit)

Solution

This error can be resolved by installing the python27 package. This is not available by default on CentOS6, however this dependency can be satisfied from the IUS repository.

Enabling IUS

To enable the IUS repository you can either follow the steps on the IUS Getting Started page, or you can execute the following on your server. 

curl https://setup.ius.io/ | bash

New Installs

No action needs to be taken for new installs as all documentation, install scripts and Server Density provided configuration management tools have been updated to ensure the agent install is successful. 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.