> On 6 Dec 2016, at 6:48 AM, [email protected] wrote: > > Hi All, > > I am using Redhat scientific Linux 6.7. OS has python2.6 already installed. > I have downloaded anaconda3.sh file from anaconda3.org and installed it. Then > I have downloaded the mod_wsgi tar.gz file, unzipped it and used the commands. > > ./configure --with-apxs=/usr/bin/python > --with-python=/home/vmuser/anaconda3/bin/pytthon3.5
Are you sure you used '--with-apxs=/usr/bin/python’. The ‘—with-apxs’ option should point to ‘apxs’, not ‘python’. On your OS it shouldn’t be needed anyway as should fine it automatically. > make > make install > > Everything goes well here and the mod_wsgi.so files is also stored in > ./etc/httpd/modules/mod_wsgi.so > > Then, if I run ldd /etc/httpd/modules/mod_wsgi.so I get the below output > > linux-vdso.so.1 => (0x00007ffda809f000) > libpython3.5m.so.1.0 => /lib64/libpython3.5m.so.1.0 (0x00007f4c4813a000) Do you have a separate Python 3.5 installation besides Anaconda Python? The Anaconda Python library would not normally be located in /lib64, so not sure what that library is. > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4c47f1e000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007f4c47d19000) > libutil.so.1 => /lib64/libutil.so.1 (0x00007f4c47b16000) > librt.so.1 => /lib64/librt.so.1 (0x00007f4c4790e000) > libm.so.6 => /lib64/libm.so.6 (0x00007f4c4760b000) > libc.so.6 => /lib64/libc.so.6 (0x00007f4c47249000) > /lib64/ld-linux-x86-64.so.2 (0x00007f4c4887e000) > > I also created a folder symlink python3.5 in /usr/local/lib to point to the > anaconda3 python library You shouldn’t really be adding any symlinks anywhere. That will likely only cause more problems. > When I have run service httpd start I get the below error > > cannot load /etc/httpd/modules/mod_wsgi.so into server: libpython3.5m.so.1.0: > cannot open shared object file: Permission denied. > > Can anyone help on this? I read many blogs but still couldnt resolve this. > > mod_wsgi express start-server is starting up correctly but httpd is not > starting.. can anyone tell me the difference and also some debug options? > > it s been 5 days I have struck on this issue. Help is highly appreciated. What you probably should have done if wanting to use Anaconda Python, is: 1. Install Anaconda Python. Do not install Anaconda Python under your home directory though as home directories are often not readable to others. This means when Apache runs mod_wsgi it may not be able to load Python runtime files. So install it under /usr/local instead as root. Do not going creating any extra symlinks to anywhere. 2. Build mod_wsgi. make distclean ./configure —with-python=/usr/local/anaconda3/bin/python3.5 LD_RUN_PATH=/usr/local/anaconda3/lib make sudo make install The setting of LD_RUN_PATH on same line as ‘make’ is run is so that mod_wsgi will know where the Python shared library is, since not in standard library directory. When you run ‘ldd’ on mod_wsgi.so after doing this, it should find libpython3.5 from Anaconda lib directory. 3. When configuring Apache, after the LoadModule line for wsgi_module add: WSGIPythonHome /usr/local/anaconda3 This is needed because Anaconda Python is not in standard location and python3.5 binary would not be found on PATH and so when Python initialised by mod_wsgi, wouldn’t know where to find the installation. There is an alternate way you can install mod_wsgi using ‘pip’, but lets see if this works first before try it. Anaconda Python can be a bit of a pain sometimes and the other way may work better. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
