由于找不到依赖项 /bin/sh,rpm 安装失败

发布于 2024-09-28 02:55:52 字数 328 浏览 1 评论 0原文

我正在尝试使用 rpm 安装一个软件包,为此我使用 rpmdb --initdb --dbpath $HOME/myrpmdb 创建了一个不同的数据库,并在安装时在 --dbpath 中指定了该路径。 我收到的错误是

root@jason:su rpm --dbpath $HOME/myrpmdb -ivh XXX.rpm
error: Failed dependencies:
/bin/sh is needed by XXX

/bin/sh 存在 有什么方法可以将其指定给安装程序吗? 在创建不同的 rpm 数据库期间我是否错过了一些东西,导致它现在无法调整默认命令?

i am trying to install a package using rpm, for which i have created a different database using rpmdb --initdb --dbpath $HOME/myrpmdb and specifying that path in the --dbpath while insatlling.
The error i am getting is

root@jason:su rpm --dbpath $HOME/myrpmdb -ivh XXX.rpm
error: Failed dependencies:
/bin/sh is needed by XXX

and /bin/sh exist
Is there some way that i can specify this to the installer?
Is there something i missed during the creation of different rpm database cause of which now it not able to fine the default commands?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

没有心的人 2024-10-05 02:55:52

通过alien安装rpm的正确方法:

alien -i my_rpm_name.rpm

如果没有安装alien:

sudo apt-get install alien

Right way install rpm via alien:

alien -i my_rpm_name.rpm

If alien is not installed:

sudo apt-get install alien
原来分手还会想你 2024-10-05 02:55:52
error: Failed dependencies:
/bin/sh is needed by XXX

发生这种情况是因为 bash rpm 在新的 rpmdb 路径中不可用。您必须使用以下命令来安装 rpm。

# rpm --dbpath $HOME/myrpmdb --nodeps -ivh XXX.rpm
error: Failed dependencies:
/bin/sh is needed by XXX

This happens because bash rpm is not available in the new rpmdb path. You would have to use following to get the rpm installed.

# rpm --dbpath $HOME/myrpmdb --nodeps -ivh XXX.rpm
国际总奸 2024-10-05 02:55:52

因为您已经告诉它使用完全不同的数据库,所以 rpm 不会查看可以找到 /bin/sh 的系统数据库。

Because you've told it to use a completely different database, rpm doesn't look at the system database which is where /bin/sh would be found.

有深☉意 2024-10-05 02:55:52

为什么要使用不同的 rpm 数据库?走这条路应该有一个很好的理由...

如果您必须有一个私有 rpm 数据库,您可以将系统数据库复制到您的私有数据库中
cp /var/lib/rpm/* ~/myrpmdb/.

使用 --nodeps 安装可能是最简单的方法...复制 rpm 数据库确实不是最佳选择,它很快就会过时并且不能反映系统的状态。

Why use a different rpm database? There should be a really good reason to go this route...

If you must have a private rpm db, you can copy the system db into your private one
cp /var/lib/rpm/* ~/myrpmdb/.

installing with --nodeps may be the easiest way... copying the rpm db is really sub-optimal, it will soon be out of date and not reflect the state of the system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文