“无法找到组件名称"在驱动程序的myodbc安装程序上 [英] "Unable to find component name" on myodbc-installer of driver

查看:456
本文介绍了“无法找到组件名称"在驱动程序的myodbc安装程序上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试遵循安装MySQL ODBC驱动程序的说明.

当我尝试运行时:

myodbc-installer -a -d -n "MySQL ODBC 8.0 Driver" -t "Driver=/usr/local/lib/libmyodbc8w.so"

它说:

[错误] SQLInstaller错误6:找不到组件名称

[ERROR] SQLInstaller error 6: Unable to find component name

我发现了一些举报同一条消息的人,例如,此处此处.但是似乎没有解决办法.

I've found a handful of cases of people reporting this same message, e.g., here and here. Yet there seems to be no resolution.

注意到各种驱动程序的-n名称字符串中的细微变化,我想知道该名称是否有些微不同,并且文档没有更新.但是我使用了十六进制编辑器来查找/usr/local/lib/libmyodbc8w.so,并且其中包含文字字符串"MySQL ODBC 8.0 Driver".

Noticing the slight variations in the -n name string for the various drivers, I wondered if perhaps the name was something subtly different and the documentation hadn't been updated. But I used a hex editor to look in /usr/local/lib/libmyodbc8w.so and the literal string "MySQL ODBC 8.0 Driver" is in it.

推荐答案

在某些情况下,名称不匹配可能会导致问题(例如,在链接至的一种情况下,他们使用-n "MySQL"而不是规定的-n "MySQL ODBC 5.3"从注释中得到.)

There may be some instances of a name mismatch causing the problem (e.g. in one of the linked-to cases, they use -n "MySQL" instead of the prescribed -n "MySQL ODBC 5.3" from the notes).

但是...就我而言,这是不使用sudo的问题.该错误消息在指示问题可能是特权方面不是很有帮助! :-/但在

However...in my case it was a matter of not using sudo. The error message is not very helpful in indicating that the problem could be a matter of privileges! :-/ But at the very top of the linked instruction page it says (emphasis mine):

要从tarball发行版(.tar.gz文件)安装驱动程序,请下载适用于您的操作系统的最新版本的驱动程序,并按照以下步骤操作,根据您下载的软件包替换相应的文件和目录名称(以下某些步骤可能需要超级用户权限)

这是什么,unixodbc具有系统范围的odbcinst.iniodbc.ini.声明您不应该直接编辑这些文件,而是通过unixodbc提供的API对其进行编辑.该API由称为myodbc-installer的MySQL帮助程序实用程序调用:

What's going on is that unixodbc has system-wide odbcinst.ini and odbc.ini. It is stated that you should not be editing these files directly, but they are edited via an API that unixodbc provides. That API is called by the MySQL helper utility called myodbc-installer:

  • The error message is delivered by this print_installer_error() routine
  • ...which is called from add_driver() when the routine SQLInstallDriverExW() returns false

(注意:大多数平台上的unixodbc提供SQLInstallDriverEx()的(宽)字符版本,但是myodbc-installer定义自己的SQLInstallDriverExW()(如果不可用的话)

(Note: unixodbc on most platforms provides the (W)ide Character version of SQLInstallDriverEx(), but myodbc-installer defines its own SQLInstallDriverExW() if it is not available via a shim.)

该API显然没有办法说它无法获得文件的必要特权(在/usr/local/etc中,或者可能只是在/etc中).所以myodbc-installer只是模仿它得到的东西.叹气.

This API apparently doesn't have a way of saying it can't get the necessary privileges to the files (in /usr/local/etc or perhaps just in /etc). So myodbc-installer is just parroting what it got. Sigh.

这篇关于“无法找到组件名称"在驱动程序的myodbc安装程序上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆