"일꾼이 일을 잘하려면 먼저 도구를 갈고 닦아야 한다." - 공자, 『논어』.
첫 장 > 프로그램 작성 > How to Fix \"mysql_config not found\" Error When Installing MySQL-python on Ubuntu/Linux?

How to Fix \"mysql_config not found\" Error When Installing MySQL-python on Ubuntu/Linux?

2025-03-26에 게시되었습니다
검색:592

How to Fix \

MySQL-python Installation Error: "mysql_config not found"

Attempting to install MySQL-python on Ubuntu/Linux Box may encounter an error message indicating that "mysql_config: not found." This error arises due to a missing MySQL development library.

To resolve this issue, it is recommended to utilize the distribution's repository on Ubuntu. Install python-mysqldb using the following command:

sudo apt-get install python-mysqldb

If installing using pip is desired, consider the following steps:

  1. Ensure that the prerequisite packages are installed:
sudo apt-get install build-essential python-dev libmysqlclient-dev
  1. Uninstall any existing MySQL-python installation:
sudo pip uninstall MySQL-python
  1. Try installing MySQL-python again using pip:
sudo pip install MySQL-python
  1. Consult this comprehensive installation guide for further details: http://mysql-python.blogspot.no/2012/11/is-mysqldb-hard-to-install.html
최신 튜토리얼 더>

부인 성명: 제공된 모든 리소스는 부분적으로 인터넷에서 가져온 것입니다. 귀하의 저작권이나 기타 권리 및 이익이 침해된 경우 자세한 이유를 설명하고 저작권 또는 권리 및 이익에 대한 증거를 제공한 후 이메일([email protected])로 보내주십시오. 최대한 빨리 처리해 드리겠습니다.

Copyright© 2022 湘ICP备2022001581号-3