Server migration Debian Some details about reconfiguration of Web services memo

Source: Internet
Author: User
Tags web services mysql database in python

The service system uses the latest Debian 7.0, but there are a few details that have caused me to toss around and I'll make a note here.

 

Before the Linux server was configured to use the Debian system has been very stable, this time to migrate to the new server environment, in the previous configuration I have made a memo on the blog, so it is easy to finish, this service system is the latest Debian 7.0, but a few details of the neglect caused me to toss a bit, I'll make a record here:

The first thing to do is to install the compilation environment, although we can easily bypass the manual compilation process through Apt-get, but some packages may have built-in compilation commands, you can compile some extenders, if you do not install the compilation environment, these extensions will fail. The development compilation suite is typically installed directly through the following command:

Copy Code code as follows:


apt-get Install build-essential

Because some of the apps are developed in Python, and the packages they rely on include extensions that can improve performance, the following error occurs at compile time:

Src/xxx.c:31:20:fatal error:python.h:no such file or directory
Compilation terminated.
Error:command ' gcc ' failed with exit status 1

In fact, we did not install the Python development environment, through the following command to resolve.

Copy Code code as follows:


apt-get Install Python-dev

Because of the use of MySQL, we also need to install the MySQL database, when we use the Apt-get command to install the MySQL database, but also for Python to install the corresponding modules, or will be the following error:

No module named MySQLdb is resolved by using the following installation command:

Copy Code code as follows:


pip Install Mysql-python

But the problem has not been resolved, in the configuration of Mysql-python when the error prompts:

Environmenterror:mysql_config not found the original default apt-get installed MySQL does not contain development files, and Mysql_config is located in the development file, you can fix the problem by installing the following package:

Copy Code code as follows:


apt-get Install Libmysqld-dev Libmysqlclient-dev

In addition, the pyramid framework has a small problem is the import zope.deprecation will report Importerror:no module named deprecation wrong. You can fix it by reinstalling the Zope.deprecation:

Copy Code code as follows:


pip--force-reinstall--upgrade zope.deprecation

Well, record here first, toss for a long time.

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.