我遵循这个答案,以便能够使用Google运行连接到外部SQL服务器。(https://stackoverflow.com/a/46446438/13342846)
但是,在部署时,我会收到以下错误
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码头档案:
# 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
任何帮助都将不胜感激!
发布于 2022-01-12 10:58:54
我也遇到了同样的问题。用unixodbc-bin代替unixodbc解决了我的问题。
https://stackoverflow.com/questions/70509874
复制相似问题