在Linux Redhat / CentOS上为msodbcsql17安装unixODBC> = 2.3.1 [英] Install unixODBC >= 2.3.1 on Linux Redhat/CentOS for msodbcsql17

查看:1157
本文介绍了在Linux Redhat / CentOS上为msodbcsql17安装unixODBC> = 2.3.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在具有CentOS / RedHat(Linux)的AWS EC2上安装msodbcsql17。

I try to install msodbcsql17 on AWS EC2 with CentOS/RedHat (Linux).

这些是我从Microsoft( LINK ):

These are the steps, I have followed, from Microsoft (LINK):

sudo su

#Download appropriate package for the OS version
#Choose only ONE of the following, corresponding to your OS version

#RedHat Enterprise Server 6
curl https://packages.microsoft.com/config/rhel/6/prod.repo > /etc/yum.repos.d/mssql-release.repo

#RedHat Enterprise Server 7
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo

exit
sudo yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
sudo ACCEPT_EULA=Y yum install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y yum install mssql-tools
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
# optional: for unixODBC development headers
sudo yum install unixODBC-devel

该指令在安装msodbcsql17之前一直有效。我收到以下错误消息:

The instruction work until the installation of msodbcsql17. I get the following error message:

Error: Package: msodbcsql17 (packages-microsoft-com-prod)
           Requires: unixODBC >= 2.3.1
           Available: unixODBC-2.2.14-14.7.amzn1.i686 (amzn-main)
               unixODBC = 2.2.14-14.7.amzn1

我认为问题是,unixODBC的最大可用版本小于2.3.1,但是如何安装msodbcsql17来

I think the problem is, that the maximum available version of unixODBC is less then 2.3.1, but how can I install msodbcsql17, to connect with Microsoft?

推荐答案

经过长时间的研究,我想出了一个解决方案:

After a long time of research, I have figured out a solution:


  1. 从任何来源以rpm(示例源

  2. 下载msodbcsql17和mssql-tool Microsoft的rpm(链接到存储库))( msodbcsql17-17.1。 0.1-1.x86_64.rpm 在我的情况下为mssql-tools-17.1.0.1-1.x86_64.rpm

  3. 传输文件通过ftp(例如FileZilla)到EC2实例

  4. 使用EC2终端并转到已上传文件的目录

  5. 输入 sudo rpm -i unixODBC-2.3.1-11.el7.x86_64.rpm 安装必需的版本(也许,您必须将版本号更改为上载文件的版本号)

  6. 输入 sudo rpm -i msodbcsql17-17.1.0.1-1.x86_64.rpm

  7. 输入 sudo rpm -i mssql-tools-17.1.0.1-1.x86_64.rpm

  1. Download the unixODBC >= 2.3.1 from any source, as rpm (Example source)
  2. Download the msodbcsql17 and mssql-tool as rpm from Microsoft (Link to Repo) (msodbcsql17-17.1.0.1-1.x86_64.rpm and mssql-tools-17.1.0.1-1.x86_64.rpm in my case)
  3. Transfer the files via ftp (like FileZilla) to the EC2 instance
  4. Use EC2 terminal and go to the directory of the uploaded files
  5. Enter sudo rpm -i unixODBC-2.3.1-11.el7.x86_64.rpm to install the necessary version (Perhaps, you have to change the version number to the version number of the uploaded file)
  6. Enter sudo rpm -i msodbcsql17-17.1.0.1-1.x86_64.rpm
  7. Enter sudo rpm -i mssql-tools-17.1.0.1-1.x86_64.rpm

按照其余的Microsoft指令进行操作,就像在您的问题中一样。

Follow the rest of the Microsoft instruction, like in your question.

您可以使用 yum install代替 rpm -i code>

Instead of rpm -i, you can use yum install as well

更新:请查看@KnudLarsen的评论!

UPDATE: Please take a look at the comment from @KnudLarsen!

这篇关于在Linux Redhat / CentOS上为msodbcsql17安装unixODBC> = 2.3.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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