Ubuntu Compilation Installation Mod_wsgi

Source: Internet
Author: User

In the compilation process encountered some problems, recorded to facilitate the use of others.

Step1:

Download. There will be a compiled package under Windows, and Ubuntu does not need to compile itself.

Address: Https://github.com/GrahamDumpleton/mod_wsgi
Step2:

Unzip and then go inside to execute sudo./configure

This tip line 2765:apxs:command is not found because Apache does not have the corresponding module installed.

Then execute the sudo apt-get install Apache2-dev

Note that when you do this, update the following sudo apt-get update the latest update is quite slow and executes all the way down. As a result, there is a package did not execute, prompted that some of the packages are not installed successfully please try to use--fix-missing do not have any effect, this time to ignore the compilation compiled can be passed, but make is still wrong

This time hint Apxs:Error:Command failed with rc=65536

There are still mistakes, there are all sorts of answers on the web that don't really fit in the end.

One answer is to execute apt-get install Python-dev This, as if it were right, and then execute it again, long waiting and then

The following "new" packages will be installed:
Libpython-dev Libpython2.7-dev Python-dev Python2.7-dev
0 packages were upgraded, 4 new packages were installed, 0 packages were uninstalled, 7 packages were not upgraded.
You need to download the 7,078 b/22.3 MB package.
34.2 MB of extra space is consumed after decompression.
Do you want to continue? [y/n] Y
"Warning": The following packages cannot be verified!
Libpython-dev Python-dev
Do you want to install these packages without verification? [y/n] Y
Get: 1 http://us.archive.ubuntu.com/ubuntu/trusty/main libpython-dev amd64 2.7.5-5ubuntu3 [7,078 B]
Download 3,044 B, time 30 seconds (98 b/s)
Selecting Libpython2.7-dev:amd64 package is not selected.
(Reading Database ... The system currently has a total of 288,195 files and directories installed. )
Preparing for unpacking .../libpython2.7-dev_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking libpython2.7-dev:amd64 (2.7.6-8ubuntu0.2) ...
Selecting Libpython-dev:amd64 package is not selected.
Preparing for unpacking .../libpython-dev_2.7.5-5ubuntu3_amd64.deb ...
Unpacking libpython-dev:amd64 (2.7.5-5UBUNTU3) ...
Selecting Python2.7-dev package is not selected.
Preparing for unpacking .../python2.7-dev_2.7.6-8ubuntu0.2_amd64.deb ...
Unpacking Python2.7-dev (2.7.6-8ubuntu0.2) ...
Selecting Python-dev package is not selected.
Preparing for unpacking .../python-dev_2.7.5-5ubuntu3_amd64.deb ...
Unpacking Python-dev (2.7.5-5UBUNTU3) ...
Processing triggers for man-db (2.6.7.1-1UBUNTU1) ...
Setting Libpython2.7-dev:amd64 (2.7.6-8ubuntu0.2) ...
Setting Libpython-dev:amd64 (2.7.5-5UBUNTU3) ...
Setting Python2.7-dev (2.7.6-8ubuntu0.2) ...
It seems normal, then make normal and make install.

The following prompt appears:

[Email protected]:~/downloads/mod_wsgi-develop$ sudo make install
/usr/bin/apxs2-i-S libexecdir=/usr/lib/apache2/modules-n ' Mod_wsgi ' src/server/mod_wsgi.la
/usr/share/apache2/build/instdso.sh sh_libtool= '/usr/share/apr-1.0/build/libtool ' src/server/mod_wsgi.la/usr/lib /apache2/modules
/usr/share/apr-1.0/build/libtool--mode=install Install src/server/mod_wsgi.la/usr/lib/apache2/modules/
Libtool:install:install src/server/.libs/mod_wsgi.so/usr/lib/apache2/modules/mod_wsgi.so
Libtool:install:install src/server/.libs/mod_wsgi.lai/usr/lib/apache2/modules/mod_wsgi.la
Libtool:finish:path= "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" Ldconfig-n/usr/lib/ Apache2/modules
----------------------------------------------------------------------
Libraries has been installed in:
/usr/lib/apache2/modules

If you ever happen to want to link against installed libraries
In a given directory, Libdir, you must either use Libtool, and
Specify the pathname of the library, or use the '-llibdir '
Flag during linking and do at least one of the following:
-Add Libdir to the ' Ld_library_path ' environment variable
During execution
-Add Libdir to the ' Ld_run_path ' environment variable
During linking
-Use the '-WL,-RPATH-WL,LIBDIR ' linker flag
-Your system administrator add Libdir to '/etc/ld.so.conf '

See all operating system documentation about GKFX libraries for
More information, such as the LD (1) and ld.so (8) manual pages.
----------------------------------------------------------------------
chmod 644/usr/lib/apache2/modules/mod_wsgi.so
The implementation of the success here, and useful words to adopt

Ubuntu Compilation Installation Mod_wsgi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.