我正在尝试通过上传所有依赖项,在未连接到互联网的amazon-linux-2server实例上安装rpm包(rstudio- EC2 )。我在很大程度上遵循了here的指示。
使用amazon-linux-2 docker镜像
在我的本地机器上,在amazonlinux docker image中,我运行:
mkdir /var/tmp/rstudio-server
mkdir /var/tmp/rstudio-server-installroot
wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-1.4.1106-x86_64.rpm
yum install --downloadonly --installroot=/var/tmp/rstudio-server-installroot/ --downloaddir=/var/tmp/rstudio-server rstudio-server-rhel-1.4.1106-x86_64.rpm --releasever latest我得到了这个错误:
Loaded plugins: ovl, priorities
Repository 'amzn2-core': Error parsing config: Error parsing "mirrorlist = '$awsproto://$amazonlinux.$awsregion.$awsdomain/latest/$product/$target/x86_64/mirror.list'": URL must be http, ftp, file or https not ""
Repository 'amzn2-core-source': Error parsing config: Error parsing "mirrorlist = '$awsproto://$amazonlinux.$awsregion.$awsdomain/latest/$product/$target/SRPMS/mirror.list'": URL must be http, ftp, file or https not ""
Repository 'amzn2-core-debuginfo': Error parsing config: Error parsing "mirrorlist = '$awsproto://$amazonlinux.$awsregion.$awsdomain/latest/$product/$target/debuginfo/x86_64/mirror.list'": URL must be http, ftp, file or https not ""
Examining rstudio-server-rhel-1.4.1106-x86_64.rpm: rstudio-server-1.4.1106-1.x86_64
Marking rstudio-server-rhel-1.4.1106-x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rstudio-server.x86_64 0:1.4.1106-1 will be installed
--> Processing Dependency: sqlite for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: postgresql-libs for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: psmisc for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Processing Dependency: /bin/sh for package: rstudio-server-1.4.1106-1.x86_64
--> Finished Dependency Resolution
Error: Package: rstudio-server-1.4.1106-1.x86_64 (/rstudio-server-rhel-1.4.1106-x86_64)
Requires: sqlite
Error: Package: rstudio-server-1.4.1106-1.x86_64 (/rstudio-server-rhel-1.4.1106-x86_64)
Requires: /bin/sh
Error: Package: rstudio-server-1.4.1106-1.x86_64 (/rstudio-server-rhel-1.4.1106-x86_64)
Requires: postgresql-libs
Error: Package: rstudio-server-1.4.1106-1.x86_64 (/rstudio-server-rhel-1.4.1106-x86_64)
Requires: psmisc
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest如果我尝试在不使用rpm标志的情况下运行它,它只会创建另外两个--installroot文件:postgresql-libs和psmisc。我假设这些是直接依赖项,但它不安装二阶依赖项。尝试对依赖项运行相同的命令不会产生任何影响。
使用CentOS docker镜像
如果我在centos docker image中尝试它,我可以构建存储库,但它似乎不能从另一端工作。
mkdir /var/tmp/rstudio-server
mkdir /var/tmp/rstudio-server-installroot
wget https://download2.rstudio.org/server/centos7/x86_64/rstudio-server-rhel-1.4.1106-x86_64.rpm
yum install --downloadonly --installroot=/var/tmp/rstudio-server-installroot/ --downloaddir=/var/tmp/rstudio-server rstudio-server-rhel-1.4.1106-x86_64.rpm --releasever 8这将在/var/tmp/rstudio-server下创建167个文件。
我将它们以及原始的rstudio-server rpm全部上传到远程机器(通过一个特殊的S3存储桶进行病毒扫描并将其移动到另一个S3存储桶),然后将所有内容下载到amazon-linux-2 EC2计算机上的/var/tmp/rstudio-server。
然后,我创建了一个名为/etc/yum.repos.d/offline-rstudio-server.repo的文件,其中包含以下内容:
[offline-rstudioserver]
name=amazon-linux-2 - rstudioserver
baseurl=file:///var/tmp/rstudio-server
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2然后我运行:
sudo yum --disablerepo=\* --enablerepo=offline-rstudioserver install /var/tmp/rstudio-server/rstudio-server-rhel-1.4.1106-x86_64.rpm它给了我很多信息,比如:
--> Processing Dependency: libgnutils.so.28()(64bit) for package: neon-0.30.0-3.amzn2.0.2.x86_64然后,有许多消息,比如:
Error: Package: python3-libs-3.7.6-1.amzn2.0.1.x86_64 (@amzn2-core)
Requires: libtirpc.so.1()(64bit)
Removing: libtirpc-0.2.4-0.16.amzn2.x86_64 (@amzn2-core)
libtirpc.so.1()(64bit)
Updated by: libtirpc-1.1.4-4.el8.x86_64 (offline-rstudioserver)
~libtirpc.so.3()(64bit)我假设这里的问题是我在CentOS机器上编译它,并将它带到amazon-linux-2机器上,那里存在一些基本的不兼容性。
我被正式卡住了。有什么想法吗?
发布于 2021-06-20 04:28:25
使用方法
在我看来,您的amazon linux安装提供了比您的离线存储库更高版本的libtirpc。通过对python3-libs的依赖
由于你是离线工作,不会从互联网上获得冲突的更新,这里是一些你可以尝试“让事情运行”的东西,我不建议将其作为生产方法:P
rpm -e --justdb --nodeps libtirpc-0.2.4-0.16.amzn2.x86_64这样做的效果是从rpm db中删除了这个包的条目,让yum觉得可以继续,同时不会从文件系统上的包中删除任何东西(如果删除了,可能会破坏程序)。
也许还有其他依赖,这可能会使事情变得复杂。祝好运。
https://stackoverflow.com/questions/67838808
复制相似问题