ubuntu 16.04 安装mysqlclient数据库驱动

来源:互联网 发布:东北大学软件学院宿舍 编辑:程序博客网 时间:2024/06/16 15:25
jhczz@vaio:~/work/MySQL$ sudo apt-get install libmysqlclient-devReading package lists... DoneBuilding dependency tree       Reading state information... DoneThe 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-confineUse 'sudo apt autoremove' to remove them.The following additional packages will be installed:  libmysqlclient20The following NEW packages will be installed:  libmysqlclient-dev libmysqlclient200 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] y0% [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$ lltotal 16drwxrwxr-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 mysqlclientCollecting mysqlclient  Using cached mysqlclient-1.3.12.tar.gzBuilding wheels for collected packages: mysqlclient  Running setup.py bdist_wheel for mysqlclient ... done  Stored in directory: /home/jhczz/.cache/pip/wheels/df/bb/60/bf7c315cbe163515db1c846e4ffa5557dd785c82e82f3492e8Successfully built mysqlclientInstalling collected packages: mysqlclientException: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$ 



原创粉丝点击