What are the considerations for reconfiguring the Web service for debian of server migration
Editor to share with you what the server migration debian reconfigure Web service points for attention, I believe that most people do not know much, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
First of all, we need to install the compilation environment, although we can easily bypass the manual compilation through apt-get, but some packages may have built-in compilation commands that can compile some extensions, which will fail if the compilation environment is not installed. Typically, the development compiler suite is installed directly with the following command:
The code is as follows:
Apt-get install build-essential
Because part of the app is developed in Python, and the package it depends on contains extensions that 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, it is because we did not install the Python development environment, through the following command to solve.
The code is as follows:
Apt-get install python-dev
Since MySQL is used, we also need to install the MySQL database. When we install the MySQL database through the apt-get command, we also need to install the corresponding module for Python, otherwise the error will be as follows:
No module named MySQLdb is resolved by the following installation command:
The code is as follows:
Pip install mysql-python
However, the problem has not been solved, and an error message is reported when configuring MySQL-Python:
EnvironmentError: mysql_config not found the MySQL installed by default apt-get does not contain the development file, but mysql_config is in the development file. You can solve this problem by installing the following package:
The code is as follows:
Apt-get install libmysqld-dev libmysqlclient-dev
In addition, a small problem within the Pyramid framework is that import zope.deprecation will report ImportError: No module named deprecation error. This can be solved by reinstalling zope.deprecation:
The code is as follows:
Pip-force-reinstall-upgrade zope.deprecation
The above is all the contents of the article "what are the considerations for debian reconfiguring Web services for server migration?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!