{"action":"created","issue":{"url":"https://api.github.com/repos/stankevich/puppet-python/issues/234","labels_url":"https://api.github.com/repos/stankevich/puppet-python/issues/234/labels{/name}","comments_url":"https://api.github.com/repos/stankevich/puppet-python/issues/234/comments","events_url":"https://api.github.com/repos/stankevich/puppet-python/issues/234/events","html_url":"https://github.com/stankevich/puppet-python/issues/234","id":102526416,"number":234,"title":"SCL python27: add a workaround for libpython2.7.so.1.0 issue (LD_LIBRARY_PATH)","user":{"login":"iakovgan","id":9697819,"avatar_url":"https://avatars.githubusercontent.com/u/9697819?v=3","gravatar_id":"","url":"https://api.github.com/users/iakovgan","html_url":"https://github.com/iakovgan","followers_url":"https://api.github.com/users/iakovgan/followers","following_url":"https://api.github.com/users/iakovgan/following{/other_user}","gists_url":"https://api.github.com/users/iakovgan/gists{/gist_id}","starred_url":"https://api.github.com/users/iakovgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iakovgan/subscriptions","organizations_url":"https://api.github.com/users/iakovgan/orgs","repos_url":"https://api.github.com/users/iakovgan/repos","events_url":"https://api.github.com/users/iakovgan/events{/privacy}","received_events_url":"https://api.github.com/users/iakovgan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-22T11:37:54Z","updated_at":"2015-08-24T15:17:51Z","closed_at":"2015-08-24T15:17:51Z","body":"Unsing SCL python27 we frequently run into an isssue with python when it can't find libpython2.7.so.1.0. Looks like there are a lot of ways of handeling this issue, but the simpliest was just adding an env variable LD_LIBRARY_PATH. I suppose it is a well known issue(see stackoverflow link in the code). \r\n\r\nHere is a workaround:  \r\n```\r\n  # Set env variable LD_LIBRARY_PATH\r\n  # see http://stackoverflow.com/questions/7880454/python-executable-not-finding-libpython-shared-library\r\n  if $python::python_version == 'python-2.6.6' {\r\n    $ld_lib_path = '/usr/lib64/python2.6'\r\n  } else {\r\n    $ld_lib_path = \"/opt/rh/${python::python_version}/root/usr/lib64/\"\r\n  }\r\n  file { '/etc/profile.d/set_ld_lib_path_for_python.sh':\r\n    mode    => '0755',\r\n    content => \"export LD_LIBRARY_PATH=${ld_lib_path}\\n\",\r\n  }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/stankevich/puppet-python/issues/comments/134245139","html_url":"https://github.com/stankevich/puppet-python/issues/234#issuecomment-134245139","issue_url":"https://api.github.com/repos/stankevich/puppet-python/issues/234","id":134245139,"user":{"login":"iakovgan","id":9697819,"avatar_url":"https://avatars.githubusercontent.com/u/9697819?v=3","gravatar_id":"","url":"https://api.github.com/users/iakovgan","html_url":"https://github.com/iakovgan","followers_url":"https://api.github.com/users/iakovgan/followers","following_url":"https://api.github.com/users/iakovgan/following{/other_user}","gists_url":"https://api.github.com/users/iakovgan/gists{/gist_id}","starred_url":"https://api.github.com/users/iakovgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iakovgan/subscriptions","organizations_url":"https://api.github.com/users/iakovgan/orgs","repos_url":"https://api.github.com/users/iakovgan/repos","events_url":"https://api.github.com/users/iakovgan/events{/privacy}","received_events_url":"https://api.github.com/users/iakovgan/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T15:17:51Z","updated_at":"2015-08-24T15:17:51Z","body":"correction: \r\n\r\na better workaround of this issue might be :\r\n```\r\n  if $python::python_version == 'python-2.6.6' {\r\n    $ld_lib_path = '/usr/lib64/python2.6'\r\n  } else {\r\n    $ld_lib_path = \"/opt/rh/${python::python_version}/root/usr/lib64/\"\r\n  }\r\n file { \"/etc/ld.so.conf.d/${python::python_version}.conf\":\r\n    content => \"$ld_lib_path\\n\",\r\n  }\r\n```\r\n"}}