Bug #85666 | Failed mysql-connector-python installation Unable to find Protobuf include dire | ||
---|---|---|---|
Submitted: | 28 Mar 2017 8:30 | Modified: | 28 Mar 2017 10:33 |
Reporter: | Shahriyar Rzayev | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | Connector / Python | Severity: | S1 (Critical) |
Version: | 2.2.3 | OS: | CentOS (7) |
Assigned to: | CPU Architecture: | Any |
[28 Mar 2017 8:30]
Shahriyar Rzayev
[28 Mar 2017 8:40]
Shahriyar Rzayev
The workaround was to install old version: pip install mysql-connector==2.1.4
[28 Mar 2017 10:33]
Chiranjeevi Battula
Hello Shahriyar, Thank you for the bug report. Developer answer in Stackoverflow site. As of 2.2.3, Connector/Python uses a C++ extension that interfaces with a MySQL server with the X plugin enabled, using Protobuf as data interchange format. So, you need to set up where Protobuf is installed on your system (the library, include and protoc binary paths). Requirements A C/C++ compiler, such as gcc Protobuf C++ (version >= 2.6.0) Python development files Installation You have two options when using pip + pypi: 1) Set environment variables for MYSQLXPB_PROTOBUF_INCLUDE_DIR, MYSQLXPB_PROTOBUF_LIB_DIR and MYSQLXPB_PROTOC. 2) Add --install-option to set these options when using pip: shell> python install mysql-connector --install-option='--with-protobuf-include-dir=<path>' --install-option='--with-protobuf-lib-dir=<path>' --install-option='--with-protoc=<path>' Important: Keep in mind that 2.2.3 is a development release. Thanks, Chiranjeevi.
[31 Mar 2017 16:29]
Markus Gerstel
RHEL7 user here. To my knowledge we don't have that library available on our machines. The development version is the version selected by default with "pip install".
[20 Sep 2017 12:22]
Ondrej Medek
Hello Chiranjeevi, since out server does not use X plugin, is it possible to install 2.2.3 (and later) without protobuf?