I tried it without pyenv and get the same error. first i tried to create a virtualenv with a manual installed version of python-2.7.10. then i want to start the without virtualenv and the seperately python-2.7.10.
Am Montag, 8. Juni 2015 13:59:35 UTC+2 schrieb Fabian Ullmann: > > It is just running if the pyenv global was set to 'system'. It is not > running with a installed version by pyenv. so I think that you are right > and the reason is anywhere located by pyenv. > > libpython2.7.so couldnĀ“t be found under the directory. > > libpython2.7.a: > > ~/.pyenv/versions/2.7.10/lib$ ls > > *libpython2.7.a* *pkgconfig* *python2.7* > > > Do you know an alternative way for me to use mod_wsgi-express with > different python versions? > > Graham, many thanks that you're so helpful. > > Am Montag, 8. Juni 2015 12:54:40 UTC+2 schrieb Graham Dumpleton: >> >> >> On 08/06/2015, at 8:35 PM, Fabian Ullmann <kon...@fabian-ullmann.de> >> wrote: >> >> So. I reinstalled the system and started again. First i used your >> configurations an installed apache2, python2.7, etc. on the same way like >> you. Everything is running fine. After them i tried to start >> mod_wsgi-express with Django. This also running fine. Then follows my next >> step, installing pyenv with virtualenv. It was required to install >> libbz2-dev and libreadline-dev additionally. >> >> After them i installed: pyenv install 2.7.10 >> And created a virtualenv with: pyenv virtualenv 2.7.10 generic >> >> Then i activated the created env: pyenv activate generic. >> >> >> Can you try without pyenv? >> >> I wouldn't be surprised if pyenv is breaking the ability to build an >> embedded system which requires a Python shared library against the >> virtualenv. >> >> I suspect this as the ldd command later on on the mod_wsgi .so file >> doesn't show a dependency on the libpython2.7.so shared library. >> >> There is a risk that the libpython2.7.a has been statically linked into >> the mod_wsgi .so file. This is bad for various reasons and actually >> generally will not even work on 64 bit Linux systems because it will >> trigger a linker problem. If it did for some reason work and the >> libpython2.7.so had a dependency on the math library, then that >> dependency will not exist for mod_wsgi .so with a statically linked >> library, thus the undefined symbol. >> >> Is there any libpython2.7.so file anywhere under the directory: >> >> /home/xx/.pyenv/versions/mod_wsgi_test-2.7.10 >> >> Where under that directory is libpython2.7.a and what else is in the same >> directory? >> >> if i try to run mod_wsgi-express with: python /mod_wsgi_test/manage.py >> runmodwsgi --port 8001 then i will get same error again: >> >> Successfully ran command. >> >> Server URL : http://localhost:8001/ >> >> Server Root : /tmp/mod_wsgi-localhost:8001:1000 >> >> Server Conf : /tmp/mod_wsgi-localhost:8001:1000/httpd.conf >> >> Error Log File : /tmp/mod_wsgi-localhost:8001:1000/error_log (warn) >> >> Request Capacity : 5 (1 process * 5 threads) >> >> Request Timeout : 60 (seconds) >> >> Queue Backlog : 100 (connections) >> >> Queue Timeout : 45 (seconds) >> >> Server Capacity : 20 (event/worker), 20 (prefork) >> >> Server Backlog : 500 (connections) >> >> Locale Setting : de_DE.UTF-8 >> >> apache2 (mod_wsgi-express): Syntax error on line 147 of >> /tmp/mod_wsgi-localhost:8001:1000/httpd.conf: Cannot load >> /home/xx/.pyenv/versions/mod_wsgi_test-2.7.10/lib/python2.7/site-packages/mod_wsgi/server/mod_wsgi-py27.so >> >> into server: >> /home/xx/.pyenv/versions/mod_wsgi_test-2.7.10/lib/python2.7/site-packages/mod_wsgi/server/mod_wsgi-py27.so: >> >> undefined symbol: fmod >> (mod_wsgi_test-2.7.10)ullmanfa@h2193173:/etc/apache2$ >> >> *ldd apache2 returns:* >> >> linux-gate.so.1 => (0xb775a000) >> >> libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb76a3000) >> >> libaprutil-1.so.0 => /usr/lib/libaprutil-1.so.0 (0xb767e000) >> >> libapr-1.so.0 => /usr/lib/libapr-1.so.0 (0xb764b000) >> >> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7632000) >> >> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb74e3000) >> >> libuuid.so.1 => /lib/i386-linux-gnu/libuuid.so.1 (0xb74dd000) >> >> librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb74d4000) >> >> libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xb74a1000) >> >> libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb749d000) >> >> libexpat.so.1 => /lib/i386-linux-gnu/libexpat.so.1 (0xb7475000) >> >> /lib/ld-linux.so.2 (0xb775b000) >> >> >> *ldd mod_wsgi_py27.so returns:* >> >> linux-gate.so.1 => (0xb76fd000) >> >> libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb74bf000) >> >> libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7370000) >> >> /lib/ld-linux.so.2 (0xb76fe000) >> >> *nm >> /usr/local/lib/python2.7/dist-packages/mod_wsgi/server/mod_wsgi-py27.so | >> grep mod * >> changes nothing. I get the same error again. >> >> >> The 'nm' command is not meant to change anything. I wanted to see what it >> output. >> >> Graham >> >> Am Freitag, 5. Juni 2015 02:38:59 UTC+2 schrieb Graham Dumpleton: >>> >>> >>> On 04/06/2015, at 10:51 AM, Graham Dumpleton <graham.d...@gmail.com> >>> wrote: >>> >>> > >>> > On 03/06/2015, at 11:11 PM, Fabian Ullmann <kon...@fabian-ullmann.de> >>> wrote: >>> > >>> >> Hello together, >>> >> >>> >> i hope you can help me. I installed Debian7 + apache2 and pydev. From >>> PyPi i installed mod_wsgi. >>> >> If I run the mod_wsgi-express script with the start-server command i >>> get an error: >>> >> >>> >> apache2 (mod_wsgi-express): Syntax error on line 147 of >>> /home/ullmanfa/server/httpd.conf: Cannot load >>> /home/ullmanfa/.pyenv/versions/test/lib/python2.7/site-packages/mod_wsgi-4.4.12-py2.7-linux-i686.egg/mod_wsgi/server/mod_wsgi-py27.so >>> >>> into server: >>> /home/ullmanfa/.pyenv/versions/test/lib/python2.7/site-packages/mod_wsgi-4.4.12-py2.7-linux-i686.egg/mod_wsgi/server/mod_wsgi-py27.so: >>> >>> undefined symbol: fmod >>> >> >>> >> Do you know what my mistake is? I hope you can help me... Thanks a >>> lot >>> > >>> > That is a strange one. >>> > >>> > The mod_wsgi source code doesn't itself use the fmod() function so >>> there should not be a reference to it. >>> > >>> > It is possible usage has crept in via use of fmod in Apache run time >>> library or Python header files in a preprocessor macro, but I can't find >>> any such reference that would do that. >>> > >>> > Only other way is that the compiler tool chain itself is generating >>> calls to that when it sees some C usage of mod operator which might need >>> it. In that case though the compiler should also ensure right libraries are >>> linked in. It would be plain stupid for compiler to require you to >>> separately link in the math library. >>> > >>> > Finally, I would also have expected the Apache main program to link >>> the math library anyway, which would see the symbol satisfied. >>> > >>> > Can you find the location of the Apache httpd executable (seems to be >>> called apache2 in your case), and run: >>> > >>> > ldd apache2 >>> > >>> > on it to see what libraries it is linked to. >>> > >>> > Also run: >>> > >>> > ldd >>> /home/ullmanfa/.pyenv/versions/test/lib/python2.7/site-packages/mod_wsgi-4.4.12-py2.7-linux-i686.egg/mod_wsgi/server/mod_wsgi-py27.so >>> >>> >>> > >>> > and send result of both. >>> > >>> > Only other thing to suggest, just in case Apache was upgraded after >>> mod_wsgi package was installed, is to do: >>> > >>> > pip uninstall mod_wsgi >>> > >>> > and reinstall it. >>> > >>> > I have seen strange things some times when Apache was updated after >>> mod_wsgi was installed. >>> > >>> > Graham >>> >>> I have installed Debian as a Docker image: >>> >>> Linux 681fbfb03047 3.18.11-tinycore64 #1 SMP Thu Apr 16 17:46:31 UTC >>> 2015 x86_64 GNU/Linux >>> >>> I then installed Apache 2, Python 2.7 and mod_wsgi. >>> >>> apt-get install apache2 >>> apt-get install apache2-threaded-dev >>> apt-get install python python-dev >>> apt-get install python-pip >>> pip install mod_wsgi >>> >>> The fmod symbol was no where in the mod_wsgi .so file. >>> >>> nm >>> /usr/local/lib/python2.7/dist-packages/mod_wsgi/server/mod_wsgi-py27.so | >>> grep mod >>> >>> And mod_wsgi-express ran fine. >>> >>> My versions of pertinent packages are as follows. Can you indicate >>> whether you are using system packages or self installed packages. >>> >>> root@681fbfb03047:/# apt-cache policy apache2 >>> apache2: >>> Installed: 2.2.22-13+deb7u4 >>> Candidate: 2.2.22-13+deb7u4 >>> Version table: >>> *** 2.2.22-13+deb7u4 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> 2.2.22-13+deb7u3 0 >>> 500 http://security.debian.org/ wheezy/updates/main amd64 >>> Packages >>> >>> root@681fbfb03047:/# apt-cache policy apache2-threaded-dev >>> apache2-threaded-dev: >>> Installed: 2.2.22-13+deb7u4 >>> Candidate: 2.2.22-13+deb7u4 >>> Version table: >>> *** 2.2.22-13+deb7u4 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> 2.2.22-13+deb7u3 0 >>> 500 http://security.debian.org/ wheezy/updates/main amd64 >>> Packages >>> >>> root@681fbfb03047:/# apt-cache policy python2.7 >>> python2.7: >>> Installed: 2.7.3-6+deb7u2 >>> Candidate: 2.7.3-6+deb7u2 >>> Version table: >>> *** 2.7.3-6+deb7u2 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 500 http://security.debian.org/ wheezy/updates/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> >>> root@681fbfb03047:/# apt-cache policy python2.7-dev >>> python2.7-dev: >>> Installed: 2.7.3-6+deb7u2 >>> Candidate: 2.7.3-6+deb7u2 >>> Version table: >>> *** 2.7.3-6+deb7u2 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 500 http://security.debian.org/ wheezy/updates/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> >>> root@681fbfb03047:/# apt-cache policy libapr1-dev >>> libapr1-dev: >>> Installed: 1.4.6-3+deb7u1 >>> Candidate: 1.4.6-3+deb7u1 >>> Version table: >>> *** 1.4.6-3+deb7u1 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> >>> root@681fbfb03047:/# apt-cache policy libaprutil1-dev >>> libaprutil1-dev: >>> Installed: 1.4.1-3 >>> Candidate: 1.4.1-3 >>> Version table: >>> *** 1.4.1-3 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >>> >>> root@681fbfb03047:/# apt-cache policy gcc >>> gcc: >>> Installed: 4:4.7.2-1 >>> Candidate: 4:4.7.2-1 >>> Version table: >>> *** 4:4.7.2-1 0 >>> 500 http://httpredir.debian.org/debian/ wheezy/main amd64 >>> Packages >>> 100 /var/lib/dpkg/status >> >> >> -- >> 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 modwsgi+u...@googlegroups.com. >> To post to this group, send email to mod...@googlegroups.com. >> Visit this group at http://groups.google.com/group/modwsgi. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- 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 modwsgi+unsubscr...@googlegroups.com. To post to this group, send email to modwsgi@googlegroups.com. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.