yum安装由于保存的事务而失败


8

我正在尝试安装一些软件包,并且yum每次都失败,指出应通过load-transaction命令安装该软件包。

我想让yum从互联网上获取软件包并安装它,因为以这种方式退出很la脚?

请找到yum命令并输出:

命令:

Step 4 : RUN yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip
 ---> Running in b0cdbf62be4e

输出:

Total download size: 82 M
Installed size: 186 M
Is this ok [y/d/N]: Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2016-07-21.12-39.KWu7ih.yumtx
The command '/bin/sh -c yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip' returned a non-zero code: 1

现在有趣的是,它正在docker构建过程中发生,所以我想删除临时映像,但是即使我删除了该映像,它也会发生。

我查看了yum帮助,但是没有标志可以覆盖/强制安装,无论是否保存。

我什至在安装yum -y之前尝试过yum clean,但没有用。

Answers:


8

问题:虽然我是做百胜"-y"在年底,我买了向前它和它的所有好现在。

从:

yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip -y

至:

yum -y install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp openssl-devel wget unzip

人们可能会争辩说这没有什么作用,从技术上讲应该没有什么区别。但是事实上,当docker按行执行时,他在执行上一行yum命令时在下一行看不到-y,这就是问题所在。

与社区共享作为Internet上的简单指针的想法可能会产生很大的不同:)

干杯


不幸的是,我遇到了同样的问题,并且没有通过在前面加上“ -y”来解决(我会感到惊讶g
Thomas Wana

1

可能还有另一个命令正在等待确认?我跑步时遇到同样的问题yum update && yum install -y <packages>。该yum更新命令还有待确认,以便运行yum update -y && yum install -y <packages>解决了该问题

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.