AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[odbc](ubuntu)

Martin Hope
niknoe
Asked: 2019-10-23 23:07:36 +0800 CST

在 19.10 上安装 unixodbc

  • 5

我正在尝试使用 pyodbc 连接到 python 中的 MSSQL 数据库。我已经按照此处的说明使用 19.04 版本安装了 MS 驱动程序。尝试通过 pip 安装 pyodbc 时,我得到sql.h: No such file or directory. 谷歌搜索告诉我我需要安装unixodbcand unixodbc-dev,但是当我尝试这样做时,我收到以下消息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 unixodbc : Depends: odbcinst1debian2 (>= 2.3.7) but it is not going to be installed
            Depends: libodbc1 (>= 2.3.7) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

运行 apt autoclean、apt install -f 等没有做任何事情。

odbc 19.10
  • 1 个回答
  • 13919 Views
Martin Hope
Mysterio
Asked: 2019-08-14 05:14:29 +0800 CST

如何在 18.04 中为 MYSQL 和 PostgreSQL 安装和配置最新的 ODBC 驱动程序

  • 6

我目前正试图通过 ODBC 连接通过 ODBC 管理员 GUI 访问一些 MYSQL 和 PostgreSQL 数据库,就像在 Windows 上一样。搜索后,我只找到了在 Ubuntu 上安装和设置 ODBC 连接的零散和旧教程。

当我在一个微妙的生产环境中工作时,有人可以帮助我提供更新的说明,所以我最不需要搞砸的事情吗?预先感谢。

mysql postgresql 18.04 odbc
  • 2 个回答
  • 5715 Views
Martin Hope
Paolo Di Pietro
Asked: 2019-03-06 10:27:28 +0800 CST

无法连接 Microsoft SQL-Server 和 Visual Studio 代码

  • 2

我刚刚在我的 Ubuntu 18.10 机器上安装了适用于 linux 的 MSSQL 2017 和适用于 linux 的 Visual Studio 代码。两个安装都成功了,但我无法从 Visual Studio 连接到数据库。

我有以下正在运行的驱动程序:

$ odbcinst -j

    unixODBC 2.3.7
    DRIVERS............: /etc/odbcinst.ini
    SYSTEM DATA SOURCES: /etc/odbc.ini
    FILE DATA SOURCES..: /etc/ODBCDataSources
    USER DATA SOURCES..: /home/neo4j/.odbc.ini
    SQLULEN Size.......: 8
    SQLLEN Size........: 8
    SQLSETPOSIROW Size.: 8

但是,当我尝试安装

$ sudo apt-get install mssql-tools unixodbc-dev

我收到以下错误:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mssql-tools : Depends: msodbcsql17 (>= 17.3.0.0) but it is not going to be installed
               Depends: msodbcsql17 (< 17.4.0.0) but it is not going to be installed
 unixodbc-dev : Depends: unixodbc (= 2.3.7)
E: Unable to correct problems, you have held broken packages.

经过大量谷歌搜索,我发现了很多建议,但它们没有运行,比如尝试删除 msodbcsql 和 unixodbc

$ sudo apt-get remove msodbcsql

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'msodbcsql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

在这一点上,我被锁定,无法继续。

有没有人正在运行的解决方案?

dependencies odbc visual-studio-code 18.10 mssql
  • 3 个回答
  • 10888 Views
Martin Hope
Raakh
Asked: 2018-07-14 01:01:06 +0800 CST

Sqlcmd:错误:Microsoft ODBC Driver 17 for SQL Server

  • 7

我无法运行sqlcmd命令
我的操作系统(18.04)是

$ uname -a Linux Linux 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ sqlcmd -S localhost -U SA -P 'password'
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
drivers database odbc sql mssql
  • 1 个回答
  • 23767 Views
Martin Hope
Rilcon42
Asked: 2018-05-24 16:58:02 +0800 CST

尽管安装,但找不到 pyodbc 驱动程序

  • 7

我已pyodbc安装并尝试连接到服务器,但pyodbc找不到驱动程序。我做了以下事情:

  1. 安装pyodbc使用pip:

    pip install pyodbc
    
  2. 按照微软的指示。

  3. 运行一个测试脚本:

    import pyodbc 
    
    print(pyodbc.drivers())
    

    它返回一个空数组。

我还需要做什么?我在 Anaconda Python 安装中的 Jupyter Notebook 中运行脚本。

python drivers odbc mssql
  • 1 个回答
  • 10902 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve