AWS Linux - Installing packages (automatically install dependent packages) - linux

I am trying to install Ted (RTF to PDF Convertor) on AWS Linux. Is there any command which will find and install all dependent packages?
I tried below command and referred a couple of posting on StackOverflow but none of those commands are working.
yum install -y http://ftp.nluug.nl/pub/editors/ted/ted-2.23-1.x86_64.rpm
I get the below error.
--> Finished Dependency Resolution
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libpng15.so.15()(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libgdk-x11-2.0.so.0()(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libpng15.so.15(PNG15_0)(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: gtk2
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libatk-1.0.so.0()(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libgtk-x11-2.0.so.0()(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libpaper.so.1()(64bit)
Error: Package: ted-2.23-1.x86_64 (/ted-2.23-1.x86_64)
Requires: libgdk_pixbuf-2.0.so.0()(64bit)
You could try using --skip-broken to work around the problem
** Found 12 pre-existing rpmdb problem(s), 'yum check' output follows:

yum will resolve dependencies automatically, but it can only download these dependencies from available repo's. It's hard to tell which distribution of Linux you're using(since you're using yum it's either Redhat or Centos).
most of the rpm dependencies are available in the base repo's so you just to enable those.
If you're using Centos 7, create a new file /etc/yum.repos.d/Centos-Base.repo and add the following content
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
save the file then clean yum cache by running:
yum clean all
Then try to download your rpm again

Related

Cannot install docker in a RHEL server

I am getting Requires: fuse-overlayfs >= 0.7 error while installing docker in RHEL-7.
sudo yum install docker-ce
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* epel: mirrors.syringanetworks.net
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:20.10.2-3.el7 will be installed
--> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.4.3-3.1.el7 will be installed
---> Package docker-ce-cli.x86_64 1:20.10.2-3.el7 will be installed
---> Package docker-ce-rootless-extras.x86_64 0:20.10.2-3.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 (docker-ce-stable)
Requires: fuse-overlayfs >= 0.7
You could try using --skip-broken to work around
I already tried
sudo rpm -Uvh http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
Retrieving http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
warning: /var/tmp/rpm-tmp.TZLjHD: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
libfuse3.so.3()(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
libfuse3.so.3(FUSE_3.0)(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
libfuse3.so.3(FUSE_3.2)(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
Building on top of #user3495504's answer, what we did to fix the problem was adding an entry on top of the file /etc/yum.repos.d/docker-ce.repo, with this content:
[centos-extras]
name=Centos extras - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/x86_64
enabled=1
gpgcheck=1
gpgkey=http://centos.org/keys/RPM-GPG-KEY-CentOS-7
Then the installation command:
yum -y install slirp4netns fuse-overlayfs container-selinux
was successful.
[Edit]
enabled gpgcheck
Had this problem too when trying to install Docker. This worked to get fuse-overlayfs
sudo yum install fuse3-devel
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
sudo yum localinstall fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
I got the package url from http://mirror.centos.org/centos/7/extras/x86_64/Packages/
The next thing missing for me is slirp4netns >= 0.4. I'm going to try the same trick. And yes, that did work and the docker install went through
sudo yum install docker-ce docker-ce-cli containerd.io
I had this problem installing docker version 20 in Oracle Linux 7.9. Installing version 19 instead, there is no problem with dependencies and to install packages from CentOS Extras repository is not needed.
sudo yum install docker-ce-19.03.9 docker-ce-cli-19.03.9 containerd.io docker-compose-plugin
edit
To show all available versions
yum list docker-ce --showduplicates | sort -r
Install the fuse3 libs package. That would provide the missing dependencies. And then try the fuse overlay package before proceeding to the docker install

Failed to install Varnish due to dependencies errors

I'm trying install varnish on CentOS 6.7 and get following errors. Can somebody help?
yum install varnish
.....
Finished Dependency Resolution
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: systemd-units
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: systemd-sysv
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
You will need to install varnish from source. Follow these steps:
https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source
Start by downloading the tarball:
http://repo.varnish-cache.org/source/
Then install the packages listed:
yum install -y autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz
tar xzvf downloaded-filename.tar.gz
cd name-of-the-folder-from-tarball
sh autogen.sh
sh configure
make
make check
(go make some tea)
make install
Read the notes on starting the service: https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source
I'm not allowed to comment but I've upvoted the answer above. I just used it to install Varnish 5.2 on Amazon Linux. The downside of this approach is that you don't get a nice tidy "sudo service varnish start" option, but the upside is that at least you've got Varnish 5.
One change to the answer above. The location of the source has changed. You'll find it here now:
http://varnish-cache.org/releases/

RHEL6 installed wrong version of rpmforge

I installed the wrong version of rpmforge for el7. Then I ran an update which installed this package on my system
python-crypto-2.6.1-1.el7.rf.x86_64
Notice the el7 but I am on rhel6. I then realized and removed the wrong repository and installed the right one for el6.
$ rpm -qa | grep rpmfor
rpmforge-release-0.5.2-2.el6.rf.x86_64
But the above process has broken the update process, which I know I could work around using --skip-broken option. How do I downgrade for the above mentioned package. I tried to uninstall and install it back again but I get this error:
Error: Trying to remove "c4ebpl", which is protected
It shows me some protected packages which can't be removed.
Update process using sudo yum update gives me this error:
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libgmp.so.10()(64bit)
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: python(abi) = 2.7
Installed: python-2.6.6-52.el6.x86_64 (#el66/$releasever)
python(abi) = 2.6
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libpython2.7.so.1.0()(64bit)
You could try using --skip-broken to work around the problem
Would anyone know how to downgrade to the original packages? Is there a way to do a factory reset? Or do I need to re-install linux again?
Some things I tried:
I deleted the python-crypto.x86_64 package using this command
sudo rpm --nodeps -e python-crypto.x86_64
And the update went through. So I thought I should install the python-crypto.x86_64package now as I have the right el6 rpmforge repository. So I ran this command sudo yum install python-crypto.x86_64 but I got the same error:
Resolving Dependencies
--> Running transaction check
---> Package python-crypto.x86_64 0:2.6.1-1.el7.rf will be installed
--> Processing Dependency: python(abi) = 2.7 for package: python-crypto-2.6.1-1.el7.rf.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.14)(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64
--> Processing Dependency: libgmp.so.10()(64bit) for package: python-crypto-2.6.1-1.el7.rf.x86_64
--> Finished Dependency Resolution
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libgmp.so.10()(64bit)
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: python(abi) = 2.7
Installed: python-2.6.6-52.el6.x86_64 (#el66/$releasever)
python(abi) = 2.6
Error: Package: python-crypto-2.6.1-1.el7.rf.x86_64 (rpmforge)
Requires: libpython2.7.so.1.0()(64bit)
You could try using --skip-broken to work around the problem
I don't know why its trying to find the el7 package? I have these libraries in my machine.
$ rpm -qa | grep rpmfor
rpmforge-release-0.5.3-1.el7.rf.x86_64
Solution from #Michael Hapton on this link
Here is the solution. I take no credit for it.
First you need to install the correct rpmforge-release package. Download it and use rpm -U --oldpackage to install it over the wrong package.
Second, you need to clean the cached yum metadata that it had. Use yum clean all to get rid of everything.
Third, use yum distro-sync to downgrade any packages that were installed for the wrong distribution. (And note that this will also upgrade any out-of-date packages.)

Screenshot application for RHEL6.5

I need some screen capture application for RHEL6.5 and tried few ways to get one but failed.
yum install gnemo-utils and got:
Reading Local RPMDB
rpmdb time: 0.000
Setting up Install Process
Checking for virtual provide or file-provide for gnome-utils
No package gnome-utils available.
Error: Nothing to do
Q: Is there a repo or some other way to get it installed?
yum install shutter
Error: Package: shutter-0.93-1.el6.nux.noarch (nux-dextop)
Requires: perl(JSON)
Error: Package: perl-Net-OAuth-0.28-1.el6.noarch (epel)
Requires: perl(Digest::SHA)
Error: Package: shutter-0.93-1.el6.nux.noarch (nux-dextop)
Requires: perl(Time::HiRes)
Error: Package: perl-Net-DBus-0.33.6-8.el6.x86_64 (epel)
Requires: perl(Time::HiRes)
Error: Package: perl-HTTP-Server-Simple-0.43-1.el6.rf.noarch (rpmforge)
Requires: perl(CGI)
Error: Package: perl-Gtk2-1.248-1.el6.x86_64 (epel)
Requires: perl(HTML::TreeBuilder)
..... more errors related to `perl`
Trying to get perl:
COMMAND: yum install perl
Installroot: /
Ext Commands:
perl
Setting up Package Sacks
Running "exclude" handler for "security" plugin
pkgsack time: 0.060
Reading Local RPMDB
rpmdb time: 0.000
Setting up Install Process
Checking for virtual provide or file-provide for perl
Nothing to do
Q: How it can be resolved?
Print Screen shortcut is complaining for gnome-screenshot not found.
Q: How it can be installed?
Ultimately, I just need some application to get screenshots.
Regards,
Try yum install gnome-utils.
You can find which package provides a particular command as follows:
# yum provides \*gnome-screenshot
[...]
1:gnome-utils-2.28.1-10.el6.x86_64 : GNOME utility programs
Repo : base
Matched from:
Filename : /usr/share/gnome-screenshot
Filename : /usr/bin/gnome-screenshot
I had a 3rd party repo added in but the machine has been re-register with RHN afterwards.
I had to remove the 3-rd party repos and register the machine again.

CentOS 64bit RPM with 32bit dependencies

I have a helper rpm package which is used to install the necessary dependencies in order for some software to work; the problem is that the dependency packages required are the 32bit ones, which can't be installed on CentOS 64bit without the --setopt=protected_multilib=false flag.
To manually install the dependencies I'd just run:
# yum install --setopt=protected_multilib=false libXrandr.i686
# yum install --setopt=protected_multilib=false gtk2.i686
# yum install --setopt=protected_multilib=false libXtst.i686
This would correctly install the 32bit version of the packages.
The problem appears when installing the helper package directly, as it seems there's no way to force --setopt=protected_multilib=false for the dependencies.
When trying to install the package (locally, using yum --nogpgcheck --setopt=protected_multilib=false localinstall centos_helper-0-0.x86_64.rpm) I get the following error:
Examining centos_helper-0-0.x86_64.rpm: centos_helper-0-0.x86_64
Marking centos_helper-0-0.x86_64.rpm to be installed
Loading mirror speeds from cached hostfile
* base: mirror.dattobackup.com
* extras: mirror.metrocast.net
* rpmforge: mirror.de.leaseweb.net
* updates: mirror.dattobackup.com
Resolving Dependencies
--> Running transaction check
---> Package centos_helper.x86_64 0:0-0 will be installed
--> Processing Dependency: libXrandr.i686 for package: centos_helper-0-0.x86_64
--> Processing Dependency: gtk2.i686 for package: centos_helper-0-0.x86_64
--> Processing Dependency: libXtst.i686 for package: centos_helper-0-0.x86_64
--> Finished Dependency Resolution
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
Requires: gtk2.i686
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
Requires: libXrandr.i686
Error: Package: centos_helper-0-0.x86_64 (/centos_helper-0-0.x86_64)
Requires: libXtst.i686
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
This is the same error I get when trying to install the dependencies by hand without the protected_multilib=false flag.
The .spec file I'm using to create the package has the following content:
Summary: CentOS helper file
Name: centos_helper
Version: 0
Release: 0
License: Public
Group: Applications/System
Requires: libXrandr.i686,gtk2.i686,libXtst.i686
%description
Installer CentOS helper package
%files
Any way to have the dependencies correctly install?
You might want to look at http://www.rpm.org/wiki/PackagerDocs/ArchDependencies
I prefer referencing sonames myself, that way yum will look up what dependancy to install.
I've had major CentOS upgrades failing because if this.
This if for recent RPM versions only : 4.6 or so. If you're on something older :
Requires: real-soname.so.1()(64bit), real-soname.so.1, packagename
From memory, you might need a tweak.

Resources