问题
安装Ubuntu 16.04后,我尝试按照官方文档安装MySQL ODBC https://help.ubuntu.com/community/ODBC:# apt-get install libmyodbc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmyodbc is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libmyodbc' has no installation candidate
Ubuntu没有驱动程序文件libmyodbc.so。
答案1
选择Ubuntu 16.04 64位或32位,下载TAR文件,然后将文件libmyodbc5a.so复制到/usr/lib/x86_64-linux-gnu/odbc//usr/lib/x86_64-linux-gnu/odbc/
然后,创建/etc/odbcinst.ini[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc5a.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcmyS.so
FileUsage = 1