-Lprobes_mysql cannot be found when MySQLdb-python is installed.

Source: Internet
Author: User

When MySQLdb-python is installed, I cannot find-lprobes_mysql. When I install MySQLdb, I have already done the following: 1) There are two ways to configure mysql_config: ① make a soft connection, link mysql_config to/usr/local/bin. ② modify the site. cfg configuration, point mysql_config to $ MYSQL_HOME/bin/mysql_config 2) configure the Dynamic Link Library: Write $ MYSQL_HOME/mysql/lib to/etc/ld. so. in the conf file, ldconfig generates the cache and thinks it is still in the dark when it is in arrears. Execute: python setup. py install reports the following error: [plain] gcc-pthread-shared build/temp. linux-i686-2.7/_ mysql. o-L/home/mysql/lib-l Mysqlclient-lpthread-lprobes_mysql-lz-lm-lrt-ldl-o build/lib. linux-i686-2.7/_ mysql. so/usr/bin/ld: cannot find-lprobes_mysql collect2: ld returns 1 error: command 'gcc 'failed with exit status 1 for source code problems. Use the Python Package Manager to install it: pip install MySQLdb-python but lprobes_mysql cannot be found, split ing later suspected to be a gcc problem, after all, there is "error: command 'gcc 'failed with exit status ". Therefore, mysql-devel is marked through the local yum source, and I thought it was okay to close my hand !! Go back to the key point and carefully analyze "/usr/bin/ld: cannot find-lprobes_mysql". We know that ld is a shared library loader, But I have configured the shared library in 2) there is no reason in it that ld cannot be found, unless there is only one possibility, that is, there is no such thing. How can we find ld ?? Because my mysql is compiled and installed by source code, CMAKE does not specify the-DENABLE_DTRACE = OFF option [ON by default], but you need to reinstall mysql ?? I can't do it... Finally, in bugs.mysql.com, I was inspired by a comment from a foreigner. I removed-lprobes_mysql from the 112nd line of libs key value in mysql_config, and then ran python setup. py install! If your mysql instance is installed in binary or in rpm, this problem may not exist.

Related Article

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.