' /usr/include/mysql/mysql/plugin.h.dpkg-new':没有这样的文件或目录

时间:2016-10-21 04:04:45

标签: mysql-python

当我在ubuntu 14.04上安装libmysqlclient-dev时,我收到此错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libmysqlclient-dev
0 upgraded, 1 newly installed, 0 to remove and 96 not upgraded.
Need to get 0 B/866 kB of archives.
After this operation, 5,604 kB of additional disk space will be used.
(Reading database ... 63461 files and directories currently installed.)
Preparing to unpack .../libmysqlclient-dev_5.5.52-0ubuntu0.14.04.1_amd64.deb ...
Unpacking libmysqlclient-dev (5.5.52-0ubuntu0.14.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libmysqlclient-dev_5.5.52-0ubuntu0.14.04.1_amd64.deb (--unpack):
 unable to open '/usr/include/mysql/mysql/plugin.h.dpkg-new': No such file or directory
No apport report written because the error message indicates an issue on the local system
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libmysqlclient-dev_5.5.52-0ubuntu0.14.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

这台机器上安装了一个mysql服务器。 我用这个cammond:sudo apt-get install libmysqlclient-dev

任何建议都很感激!

1 个答案:

答案 0 :(得分:0)

我也遇到了这个让我很困惑的错误。

root@ubuntu:~# ll  /usr/local/mysql/include/mysql
总用量 248
drwxr-xr-x 3 root mysql  4096  3月 30 23:10 ./
drwxr-xr-x 3 root mysql  4096  3月 30 14:44 ../
-rw-r--r-- 1 root mysql  1077  2月  2  2016 client_authentication.h
-rw-r--r-- 1 root mysql  1986  2月  2  2016 client_plugin.h.pp
-rw-r--r-- 1 root mysql  3105  2月  2  2016 com_data.h
-rw-r--r-- 1 root mysql  1198  2月  2  2016 get_password.h
-rw-r--r-- 1 root mysql  4281  2月  2  2016 group_replication_priv.h
-rw-r--r-- 1 root mysql  2167  2月  2  2016 innodb_priv.h
lrwxrwxrwx 1 root root     30  3月 30 18:31 mysql -> /usr/local/mysql/include/mysql/

请使用真正的标题目录修复圆形软链接。

root@ubuntu:~# ls /usr/local/mysql/include/mysql -d
/usr/local/mysql/include/mysql
root@ubuntu:~# ls /usr/local/mysql/include/mysql
client_authentication.h   my_compiler.h       mysqld_error.h        plugin_ftparser.h.pp        service_mysql_password_policy.h      service_thread_scheduler.h
client_plugin.h           my_config.h         mysql_embed.h         plugin_group_replication.h  service_mysql_string.h               sql_common.h
client_plugin.h.pp        my_config_x86_64.h  mysql.h               plugin.h                    service_parser.h                     sql_state.h
com_data.h                my_dbug.h           mysql_lex_string.h    plugin_keyring.h            service_rpl_transaction_ctx.h        sslopt-case.h
decimal.h                 my_dir.h            mysql_time.h          plugin_keyring.h.pp         service_rpl_transaction_write_set.h  sslopt-longopts.h
errmsg.h                  my_getopt.h         mysql_version.h       plugin_trace.h              service_rules_table.h                sslopt-vars.h
get_password.h            my_global.h         my_sys.h              plugin_validate_password.h  service_security_context.h           thread_pool_priv.h
group_replication_priv.h  my_list.h           my_xml.h              psi                         services.h                           thread_type.h
innodb_priv.h             my_net.h            plugin_audit.h        service_command.h           services.h.pp                        typelib.h
keycache.h                my_no_pthread.h     plugin_audit.h.pp     service_locking.h           service_srv_session.h
m_ctype.h                 my_pthread.h        plugin_auth_common.h  service_my_plugin_log.h     service_srv_session_info.h
m_string.h                mysql               plugin_auth.h         service_my_snprintf.h       service_thd_alloc.h
my_alloc.h                mysql_com.h         plugin_auth.h.pp      service_mysql_alloc.h       service_thd_engine_lock.h
my_attribute.h            mysqld_ername.h     plugin_ftparser.h     service_mysql_keyring.h     service_thd_wait.h

然后,将成功安装libmysqlclient-dev。