首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >包unixodbc-bin不可用,但由另一个包引用。

包unixodbc-bin不可用,但由另一个包引用。
EN

Stack Overflow用户
提问于 2021-12-28 16:34:22
回答 1查看 1.4K关注 0票数 0

我遵循这个答案,以便能够使用Google运行连接到外部SQL服务器。(https://stackoverflow.com/a/46446438/13342846)

但是,在部署时,我会收到以下错误

代码语言:javascript
复制
Package unixodbc-bin 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
[91mE: Package 'unixodbc-bin' has no installation candidate
[0m
unable to stream build output: The command '/bin/sh -c apt-get install unixodbc-bin -y' returned a non-zero code: 100
Failed to build the app. Error: unable to stream build output: The command '/bin/sh -c apt-get install unixodbc-bin -y' returned a non-zero code: 100

码头档案:

代码语言:javascript
复制
# Python image to use.
FROM python:3.7

# Set the working directory to /app
WORKDIR /app

# copy the requirements file used for dependencies
COPY requirements.txt .

ADD odbcinst.ini /etc/odbcinst.ini
RUN apt-get update 
RUN apt-get install -y tdsodbc unixodbc-dev 
RUN apt-get install unixodbc-bin -y 
RUN apt-get clean -y 

#....etc

我还创建了odbcinst.ini文件,如下所述:https://stackoverflow.com/a/55282188/13342846

它使用的Python映像为3.7

任何帮助都将不胜感激!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-12 10:58:54

我也遇到了同样的问题。用unixodbc-bin代替unixodbc解决了我的问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70509874

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档