postgresql - 错误:包:pgdg-redhat-repo-42.0-6.noarch (/pgdg-redhat10-10-2.noarch) - 要求:/etc/redhat-release
问题描述
这是一个 DockerFile。在 Mac 上面临问题。
Error: Package: pgdg-redhat-repo-42.0-6.noarch (/pgdg-redhat10-10-2.noarch)
Requires: /etc/redhat-release
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
The command '/bin/sh -c yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-redhat10-10-2.noarch.rpm' returned a non-zero code: 1
请检查下面的 Dockerfile
FROM lambci/lambda:build-ruby2.5
RUN yum install -y \
https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-6-x86_64/pgdg-redhat10-10-2.noarch.rpm
RUN sed -i "s/rhel-\$releasever-\$basearch/rhel-6.9-x86_64/g" "/etc/yum.repos.d/pgdg-10-redhat.repo"
RUN yum install -y postgresql10-devel
RUN gem update bundler
CMD "/bin/bash"
请提供适用于 Mac 的解决方案。我尝试了所有其他类似的问题答案,但对我没有任何帮助,所以再次发布。
解决方案
推荐阅读
- django - Django REST Serializer 使用错误的模型进行序列化
- python - python文件写入程序运行时如何更新桌面上的文件大小
- javascript - 使用 d3.js 更新表数据
- c# - C#捕获从不在进程中的函数返回的异常?
- r - 如何设置仅在输入 3 时才显示集合向量的函数?
- javascript - 如果 URI 没有改变,例如在单页应用程序上,如何检测用户是否在新页面上?
- angular - Angular Kendo UI 全局访问
- php - 内连接循环通过
- git - 如何 git rebase 从另一个分支直接到 master 分支?
- javascript - 受控数字比例映射