您的位置:首页 > 数据库 > MySQL

ubuntu 16.04 安装mysqlclient数据库驱动

2017-09-12 15:23 447 查看
jhczz@vaio:~/work/MySQL$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra linux-headers-4.8.0-36 linux-headers-4.8.0-36-generic
linux-image-4.8.0-36-generic linux-image-extra-4.8.0-36-generic snap-confine
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libmysqlclient20
The following NEW packages will be installed:
libmysqlclient-dev libmysqlclient20
0 upgraded, 2 newly installed, 0 to remove and 16 not upgraded.
Need to get 1,968 kB of archives.
After this operation, 11.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
0% [Working]
Get:1 http://hk.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmysqlclient20 amd64 5.7.19-0ubuntu0.16.04.1 [809 kB]
Get:2 http://hk.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmysqlclient-dev amd64 5.7.19-0ubuntu0.16.04.1 [1,159 kB]
Fetched 1,968 kB in 4s (406 kB/s)
Selecting previously unselected package libmysqlclient20:amd64.
(Reading database ... 252159 files and directories currently installed.)
Preparing to unpack .../libmysqlclient20_5.7.19-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.19-0ubuntu0.16.04.1) ...
Selecting previously unselected package libmysqlclient-dev.
Preparing to unpack .../libmysqlclient-dev_5.7.19-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient-dev (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libmysqlclient20:amd64 (5.7.19-0ubuntu0.16.04.1) ...
Setting up libmysqlclient-dev (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
jhczz@vaio:~/work/MySQL$ ll
total 16
drwxrwxr-x 4 jhczz jhczz 4096 Sep 12 15:07 ./
drwxrwxr-x 9 jhczz jhczz 4096 Sep 12 11:35 ../
drwxrwxr-x 3 jhczz jhczz 4096 Sep 12 15:07 mysql-client/
drwxrwxr-x 3 jhczz jhczz 4096 Sep 12 13:33 navicat_for_MySQL/
jhczz@vaio:~/work/MySQL$ pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-1.3.12.tar.gz
Building wheels for collected packages: mysqlclient
Running setup.py bdist_wheel for mysqlclient ... done
Stored in directory: /home/jhczz/.cache/pip/wheels/df/bb/60/bf7c315cbe163515db1c846e4ffa5557dd785c82e82f3492e8
Successfully built mysqlclient
Installing collected packages: mysqlclient
Exception:
Traceback (most recent call last):
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files
clobber(source, lib_dir, True)
File "/home/jhczz/.local/lib/python3.5/site-packages/pip/wheel.py", line 323, in clobber
shutil.copyfile(srcfile, destfile)
File "/usr/lib/python3.5/shutil.py", line 115, in copyfile
with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/_mysql_exceptions.py'
jhczz@vaio:~/work/MySQL$

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: