0

下面是 Dockerfile。我厌倦了许多组合。它不工作。我需要使用 Oraclelinux。我打算使用 docker 进行本地开发和测试。你能帮我解决这个问题吗?

  FROM oraclelinux:7-slim

# Installing Oracle Instant client
RUN yum -y install oracle-release-el7 && \
    yum-config-manager --enable ol7_oracle_instantclient && \
    yum -y install oracle-instantclient19.3-basiclite && \
    rm -rf /var/cache/yum

# Installing Python and cs_oracle package
RUN yum install -y oracle-epel-release-el7 && \
    yum install -y python36 && \
    yum install -y python36-dev

错误:

Package python36-3.6.8-1.el7.x86_64 is obsoleted by python3-3.6.8-13.0.1.el7.x86_64 which is already installed
--> Processing Dependency: python36-libs(x86-64) = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-libs-3.6.8-1.el7.x86_64 is obsoleted by python3-libs-3.6.8-13.0.1.el7.x86_64 which is already installed
--> Finished Dependency Resolution
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
           Requires: python36 = 3.6.8-1.el7
           Installed: python3-3.6.8-13.0.1.el7.x86_64 (@ol7_latest)
               python36 = 3.6.8-13.0.1.el7
           Available: python3-3.6.8-10.0.1.el7.x86_64 (ol7_latest)
               python36 = 3.6.8-10.0.1.el7
           Available: python36-3.6.3-7.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.3-7.el7
           Available: python36-3.6.6-1.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.6-1.el7
           Available: python36-3.6.6-2.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.6-2.el7
           Available: python36-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
               python36 = 3.6.8-1.el7
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
           Requires: python36-libs(x86-64) = 3.6.8-1.el7
           Installed: python3-libs-3.6.8-13.0.1.el7.x86_64 (@ol7_latest)
               python36-libs(x86-64) = 3.6.8-13.0.1.el7
           Available: python3-libs-3.6.8-10.0.1.el7.x86_64 (ol7_latest)
               python36-libs(x86-64) = 3.6.8-10.0.1.el7
           Available: python36-libs-3.6.3-7.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.3-7.el7
           Available: python36-libs-3.6.6-1.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.6-1.el7
           Available: python36-libs-3.6.6-2.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.6-2.el7
           Available: python36-libs-3.6.8-1.el7.x86_64 (ol7_developer_EPEL)
               python36-libs(x86-64) = 3.6.8-1.el7
4

2 回答 2

0

我看到您正在尝试安装一个被另一个版本的 python 淘汰的 python 版本。在这种情况下,您可以尝试卸载当前版本的 python 并安装您尝试安装的特定版本。

希望它有效!:)

于 2020-07-03T10:38:48.433 回答
0

查看oracle/docker-images/OracleLinuxDevelopers存储库中的 Dockerfile。

有2个例子:

  • oraclelinux7-python:3.6是在 oraclelinux:7-slim 之上的 Python 3.6
  • oraclelinux7-python:3.6-oracledb具有相同的 python 版本,但还包括 Oracle Instant Client 包
于 2020-07-03T15:17:32.630 回答