I try to run some Python programs in chroot and I get the following error
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
I used ldd to find the libraries on which the python runtime depends and copied the inside the jail. Could you please help me with that?
Thank you
That is because some libraries are not visible from the chroot environment.
Copy them or mount them using
mount --bind
.Just to illustrate what I mean (of course you need not to copy all the libraries):
Or, using mount bind: