Установка mysqlclient CentOS7.3
6 years 4 months ago - 6 years 4 months ago #977
by veadm
veadm created the topic: mysqlclient
Доброго времени.
Скажите, пожалуйста, а как поставить mysqlclient?
Centos 7.3
mariadb 10.2
Скажите, пожалуйста, а как поставить mysqlclient?
Centos 7.3
mariadb 10.2
[root@sopds sopds]# pip3.4 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.9.tar.gz
Complete output from command python setup.py egg_info:
/bin/sh: mysql_config: команда не найдена
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-f6o8bzlv/mysqlclient/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-f6o8bzlv/mysqlclient/setup_posix.py", line 44, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-f6o8bzlv/mysqlclient/setup_posix.py", line 26, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
OSError: mysql_config not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-f6o8bzlv/mysqlclient/
Last Edit: 6 years 4 months ago by veadm.
Please Войти or Create an account to join the conversation.
- veadm
-
Topic Author
- Offline
- Новый участник
-
Less
More
- Posts: 13
6 years 4 months ago #978
by veadm
veadm replied the topic: mysqlclient
установка django-mysql не помогла
Please Войти or Create an account to join the conversation.
- veadm
-
Topic Author
- Offline
- Новый участник
-
Less
More
- Posts: 13
6 years 4 months ago - 6 years 4 months ago #979
by mitshel
mitshel replied the topic: mysqlclient
попробуйте сначала:Или возможно
yum install python3-mysqldb
yum install mariadb-devel
Last Edit: 6 years 4 months ago by mitshel.
Please Войти or Create an account to join the conversation.
- mitshel
-
- Offline
- Администратор
-
Less
More
- Posts: 297
- Karma: 8
6 years 4 months ago - 6 years 4 months ago #980
by veadm
veadm replied the topic: mysqlclient
поставил,но pip3.4 install mysqlclient завершается ошибкой:
хотя development tools установлен, что нему не хватет
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-3.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-3.4
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,3,9,'final',1) -D__version__=1.3.9 -I/usr/include/mysql -I/usr/include/python3.4m -c _mysql.c -o build/temp.linux-x86_64-3.4/_mysql.o
gcc -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-3.4/_mysql.o -L/usr/lib64 -L/usr/lib64 -lmysqlclient -lpython3.4m -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.so
/usr/bin/ld: cannot find -lmysqlclient
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-vtaix3cs/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-ziu177kw-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-vtaix3cs/mysqlclient/
хотя development tools установлен, что нему не хватет
Last Edit: 6 years 4 months ago by veadm.
Please Войти or Create an account to join the conversation.
- veadm
-
Topic Author
- Offline
- Новый участник
-
Less
More
- Posts: 13
6 years 4 months ago - 6 years 4 months ago #981
by veadm
veadm replied the topic: mysqlclient
а оно найти не может либы похоже
а ищет она их
непонятно где
/usr/bin/ld: cannot find -lmysqlclient
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
error: command 'gcc' failed with exit status 1
а ищет она их
/usr/bin/ld -lmysqlclient --verbose
==================================================
attempt to open /usr/x86_64-redhat-linux/lib64/libmysqlclient.so failed
attempt to open /usr/x86_64-redhat-linux/lib64/libmysqlclient.a failed
attempt to open /usr/lib64/libmysqlclient.so failed
attempt to open /usr/lib64/libmysqlclient.a failed
attempt to open /usr/local/lib64/libmysqlclient.so failed
attempt to open /usr/local/lib64/libmysqlclient.a failed
attempt to open /lib64/libmysqlclient.so failed
attempt to open /lib64/libmysqlclient.a failed
attempt to open /usr/x86_64-redhat-linux/lib/libmysqlclient.so failed
attempt to open /usr/x86_64-redhat-linux/lib/libmysqlclient.a failed
attempt to open /usr/local/lib/libmysqlclient.so failed
attempt to open /usr/local/lib/libmysqlclient.a failed
attempt to open /lib/libmysqlclient.so failed
attempt to open /lib/libmysqlclient.a failed
attempt to open /usr/lib/libmysqlclient.so failed
attempt to open /usr/lib/libmysqlclient.a failed
непонятно где
Last Edit: 6 years 4 months ago by veadm.
Please Войти or Create an account to join the conversation.
- veadm
-
Topic Author
- Offline
- Новый участник
-
Less
More
- Posts: 13
6 years 4 months ago #982
by veadm
veadm replied the topic: mysqlclient
помогло:
ln -s /usr/lib64/libmysqlclient.so.18 /usr/lib/libmysqlclient.so
Please Войти or Create an account to join the conversation.
- veadm
-
Topic Author
- Offline
- Новый участник
-
Less
More
- Posts: 13
Time to create page: 0.101 seconds