无法找到包 msodbcsql

Unable to locate package msodbcsql(无法找到包 msodbcsql)
本文介绍了无法找到包 msodbcsql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用此 指导.当我进入步骤时:

I'm trying to install mssql driver on Ubuntu 16.04 using this guidance. When I get into the step :

sudo ACCEPT_EULA=Y apt-get install msodbcsql

我收到一个错误:无法找到包 msodbcsql我错过了哪一步?

I got an error : Unable to locate package msodbcsql What step did I miss?

提前致谢.

推荐答案

看来,因为根据那个 url,Ubuntu 的正确命令是:

It seems, because, according to that url, right command for Ubuntu is:

sudo ACCEPT_EULA=Y apt-get install msodbcsql17

16.04 的完整脚本:

sudo su 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

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


#Ubuntu 16.04
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list


exit
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
# optional: for bcp and sqlcmd
sudo ACCEPT_EULA=Y apt-get 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 apt-get install unixodbc-dev

<小时>

更新(18 年 4 月 13 日)

考虑通过运行以下命令来检查 Microsoft 存储库是否已正确注册:

Consider to check that Microsoft repository properly registered by running:

sudo apt-get update

因此,您应该看到类似于 Get:30 http packages.microsoft.com/.."的一行

As a result you should see a line similar to a "Get:30 http packages.microsoft.com/ .."

我的虚拟机示例:

Get:29 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B]
Get:30 https://packages.microsoft.com/ubuntu/16.04/prod xenial/main amd64 Packages [31.7 kB]
Fetched 12.9 MB in 5s (2,265 kB/s)

这篇关于无法找到包 msodbcsql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)
How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?(如何使用Microsoft SQL Server Management Studio生成数据库的实体关系(ER)图?)