Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upyum become unavailable if I set LD_LIBRARY_PATH=pitchfork/deployment/lib #390
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mhsieh
Apr 28, 2017
Member
Hello Takashi,
You might not want to use pitchfork environment all the time, it's not recommended to write that setting to your ~/.bashrc or ~/.bash_profile or ~/.profile files. But if you really want to use yum under pitchfork environment, I will need to investigate a little bit and go back to you.
|
Hello Takashi, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mhsieh
Apr 28, 2017
Member
Dear Takashi,
Can you check your yum really quick for me? Can you post the output of this command for us?
head $(which yum)
|
Dear Takashi,
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TakashiKoyama
Apr 29, 2017
Dear mhsieh
Thank you for your comments!
Here is the output.
$ head $(which yum)
#!/usr/bin/python
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
%s
Takashi
TakashiKoyama
commented
Apr 29, 2017
|
Dear mhsieh Thank you for your comments!
Takashi |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mjhsieh
Apr 29, 2017
Contributor
That's very interesting, I am not sure how it could be the case of pitchfork could possibly interfere with your system yum. Can you try env -u LD_LIBRARY_PATH yum --help? Let's see if your system yum still has similar error without LD_LIBRARY_PATH.
|
That's very interesting, I am not sure how it could be the case of pitchfork could possibly interfere with your system yum. Can you try |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TakashiKoyama
Apr 29, 2017
Hi,
yum works withenv -u LD_LIBRARY_PATH yum --help and so yum works without LD_LIBRARY_PATH.
I think the cause of this phenomena might be from change of sys.path in python environment as shown below.
# env -u LD_LIBRARY_PATH python
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib64/python2.7/site-packages/gtk-2.0', '/usr/lib/python2.7/site-packages']
>>> quit()
# python
Python 2.7.10 (default, Apr 7 2017, 00:55:54)
[GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python27.zip', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7/plat-linux2', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7/lib-tk', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7/lib-old', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7/lib-dynload', '/home/samba/Suijitsu_Public/software/pitchfork/deployment/lib/python2.7/site-packages']
>>> quit()
As you can see, version of python and sys.path is changed between with and without LD_LIBRARY_PATH.
Takashi
TakashiKoyama
commented
Apr 29, 2017
|
Hi, yum works with I think the cause of this phenomena might be from change of
As you can see, version of python and sys.path is changed between with and without LD_LIBRARY_PATH. Takashi |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mhsieh
May 1, 2017
Member
I see. I would recommend removal of any reference pitchfork in /etc/profile if it's possible for you. The libpython*.so is what causes the problem. Some suggestion will follow after I finish my day job work.
|
I see. I would recommend removal of any reference pitchfork in /etc/profile if it's possible for you. The libpython*.so is what causes the problem. Some suggestion will follow after I finish my day job work. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mhsieh
May 2, 2017
Member
Sorry I was spent last night, here are my suggestions for the solution:
- First solution would be rethinking your strategy and avoid putting pitchfork setting in your
/etc/profileor user profile, instead of that you can design a wrapper as an entry point of your commands. For example a command wrapper callmypb:
#!/bin/bash
source /home/samba/Suijitsu_Public/software/pitchfork/deployment/setup-env.sh
$@
add this mypb to your PATH, suppose you put it in your $HOME/bin/mypb and your $PATH includes $HOME/bin, then you should be able to do this easily:
$ mypb blasr --version
blasr 5.3.da161e5
- Second solution would still be removing pitchfork settings from your /etc/profile and user's profile, to use
bash --init-file /home/samba/Suijitsu_Public/software/pitchfork/deployment/setup-env.sh(I call this "pitchfork shell") when you want to use pitchfork build just like what we wrote in the documentation. But this time I recommend you to rebuild your pitchfork with this:
cd ~/pitchfork
yes | make _startover
echo HAVE_PYTHON=/usr/bin/python >> settings.mk
make <your software>
so you can still run yum under "pitchfork shell".
Of course you can do both suggestions at the same time.
|
Sorry I was spent last night, here are my suggestions for the solution:
add this mypb to your PATH, suppose you put it in your
so you can still run Of course you can do both suggestions at the same time. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
TakashiKoyama
May 8, 2017
Hi,
Sorry for late reply.
Thank you so much for the solutions.
Both of them works fine!
Takashi
TakashiKoyama
commented
May 8, 2017
|
Hi, Sorry for late reply. Takashi |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mhsieh
Jan 27, 2018
Member
cleaning up old issues, if yo'all find issue I haven't solved, feel free to re-open it, thanks!
|
cleaning up old issues, if yo'all find issue I haven't solved, feel free to re-open it, thanks! |
TakashiKoyama commentedApr 28, 2017
Hi,
I'm using CentOS7.
I set
in /etc/profile to make pitchfork libraries be available .
However if I do so, yum become unavailable with saying that
How can I solve this problem?
Thank you for your kind helps!
Takashi