|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Python/Apache
Code:
$ man python man: no entry for python in the manual. $ man -k python python (1) - an interpreted, interactive, object-oriented programming language $ man python (1) ksh: syntax error: `(' unexpected $ man python \(1\) man: no entry for python in the manual. man: no entry for (1) in the manual. $ man "python \(1\)" man: no entry for python \(1\) in the manual. $ man "python (1)" man: no entry for python (1) in the manual. $ locate python | grep 1 ... /usr/local/man/man1/python2.5.1 ... $ man python2.5.1 man: no entry for python2.5.1 in the manual. $ man -M /usr/local/man/man1/ python2.5.1 man: no entry for python2.5.1 in the manual. Last edited by IIMarckus; 18th October 2008 at 04:49 AM. |
|
|||
$ man python2.5 The reason for attaching the Python version number (as I can tell...) is to make the manpages for differing versions available if they are installed. Recognize that there are significant differences in Python in these later versions, so being able to read their respective manpages may be necessary. If you would rather the version number not be required in scripts (recall that the first line is typically "#!/usr/local/bin/python2.5"...)), since python2.5 lives in /usr/local/bin, it is not uncommon for the following link to be added to hide the version number: # ln -sf /usr/local/bin/python2.5 /usr/local/bin/python In other words, creating the above link simplifies the first line in scripts to be "#!/usr/local/bin/python". If the version of Python installed is 2.5.1 (found with the following command...): $ python --version Note that in the manpage's pathname, /usr/local/man/man1/python2.5.1, the last digit is not meant to be associated to Python's version number. It is meant to represent the manpage section number. Lastly, man(1) output seen in the following: Quote:
$ man 1 python2.5 For the details, study information about "sections" found in the man(1) manpage. Last edited by ocicat; 18th October 2008 at 04:47 AM. |
|
|||
Thanks a lot for the detailed response!
Now I’m having problems while attempting to integrate Python with Apache. I downloaded mod_python-2.7.11 and ran DSO # ./configure --with-apxs=/usr/sbin/apxs (after creating a hardlink from python to python2.5), then make and make install, all with no problem.After that I added "LoadModule python_module /usr/lib/apache/modules/mod_python.so" to httpd.conf and restarted Apache, or tried to. Code:
# apachectl configtest /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_signal' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_destroy' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_create' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_init' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_detach' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_attr_setstacksize' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_init' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_unlock' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_self' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_destroy' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_lock' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_wait' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_cond_destroy' /usr/sbin/httpd:/usr/lib/apache/modules/mod_python.so: undefined symbol 'pthread_mutex_init' Syntax error on line 215 of /var/www/conf/httpd.conf: Cannot load /usr/lib/apache/modules/mod_python.so into server: Cannot load specified object What alternatives are there for using Python with Apache? Last edited by IIMarckus; 18th October 2008 at 04:48 AM. |
|
|||
Here, you are on your own since the OpenBSD project does not have a version of mod_python in the packages/ports system at this time.
Having said this, I'm guessing that you downloaded source found on apache.org. Note that they are most likely going to be targeting Linux's filesystem layout which is different than that of OpenBSD (see hier(7) for more information...). Given that the errors cited indicate that the pthreads library is not being found, you will need to look into the Makefiles, etc. to see that the correct path & filename are being used. In OpenBSD, this library is /usr/lib/libpthread.so.10.0, or some similar version number. I suspect that the path found in source downloaded directly from Apache's Website will be different. In general, the problem you describe is common when attempting to configure Linux-oriented applications on OpenBSD. Maybe resolving this pthreads library issue will be all you need to do, or maybe it is only the beginning of a myriad of thorns. Each & every application has its own level of difficulty in porting. Frequently, the problems range from:
http://openbsd.org/faq/faq9.html#Interact In particular, it would be good to study the compat_linux(8) manpage. Because the knowledge needed to port applications is rather specific & detailed, we at this site generally take the same position as the project proper -- you are working in uncharted waters, so you are on your own if you choose to continue porting mod_python. As for alternatives, mod_perl is already available in the packages/ports system: http://openports.se/www/mod_perl Last edited by ocicat; 18th October 2008 at 06:01 AM. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LCD Backlight Trouble | zer0x | OpenBSD General | 3 | 24th July 2009 08:22 AM |
Reading paging files. | Mr-Biscuit | Off-Topic | 5 | 8th June 2009 07:22 PM |
Intesting reading on recent X11 changes | vermaden | General software and network | 4 | 14th May 2009 03:39 AM |
Manpage colorization on the terminal | JMJ_coder | NetBSD General | 2 | 17th February 2009 09:17 PM |
dd+user=trouble | graudeejs | FreeBSD Security | 4 | 26th September 2008 03:48 PM |