12

I am trying to install some packages and yum fails every time stating that the package should be installed by load-transaction command.

I want yum to fetch the packages from internet and install it as exiting in this way is lame?

Please find the yum command and output:

Command:

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

Output:

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

Now the funny thing is it is happening in docker build process so I thought to delete the interim image but its happening even if I delete the image.

I looked at yum help but there are no flags which would override/force installation regardless if it is saved.

I tried even yum clean all before yum -y install but its of no use.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
learner
  • 351

3 Answers3

12

Issue: Even though I was doing yum "-y" was at the end , I bought it forward and its all good now.

from:

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

to:

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

People may argue that doesn't make difference and technically it should not. But matter of fact is when docker executes per line basis he doesn't see -y on next line as he is executing the previous line yum command and this was the problem.

Thought to share with community as simple pointer on the Internet can make big difference :)

Cheers

Rao
  • 103
learner
  • 351
2

May be there is another command waiting for confirmation? I had the same issue when I run yum update && yum install -y <packages>. The yum update command also waits for confirmation so run yum update -y && yum install -y <packages> fixed the issue

ploth
  • 1,089
0

In the example above, you can just re-run the transaction

sudo yum load-transaction /tmp/yum_save_tx.2016-07-21.12-39.KWu7ih.yumtx
hanxue
  • 591