Package for java not being picked up by Chef even when specifying a valid version - vagrant

I am bumping my head due to an error occurring in Chef 13 while trying to spawn a centos/6 image on a vagrant 2.0.2 box.
My task is quite basic: I am trying to install java-openjdk with version 1.8.0 and I am using the yum_package as follows:
yum_package "java" do
flush_cache [ :before ]
arch 'x86_64'
version "java-1.8.0-openjdk"
action :install
end
And here's the catch:
If I don't specify the version, I will get java-openjdk 1.5.0.
When I specify the version, as shown in the code above, I will get that "no candidate version available for java".
When I try to state a version >= by doing
yum_package "java > java-1.8.0-openjdk" do
I will get that many options are available and yum installs java 1.5 since it is the first one it found (which sounds a bit surprising):
WARN: yum_package[java >= java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9] matched multiple Provides for java >= java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9 but we can only use the first match: java-1.5.0-gcj. Please use a more specific version.
I have even gone to the extent of setting the version to the full name of the file: java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9.x86_64 which is listed as a valid version once I go inside the vagrant box and do a --show-duplicates from yum:
yum search --showduplicates java-1.8.0-openjdk
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.hmc.edu
* epel: mirror.compevo.com
* extras: mirror.texas3006.com
* updates: centos.mirror.lstn.net
===================================================================== N/S Matched: java-1.8.0-openjdk ======================================================================
1:java-1.8.0-openjdk-1.8.0.121-1.b13.el6.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.131-0.b11.el6_9.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.141-2.b16.el6_9.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.141-3.b16.el6_9.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.144-0.b01.el6_9.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64 : OpenJDK Runtime Environment
1:java-1.8.0-openjdk-1.8.0.161-3.b14.el6_9.x86_64 : OpenJDK Runtime Environment
Even more strangely, once I go inside the box I can easily install java jdk by just running yum install java, it will pick up correctly java 1.8.0:
root#localhost vagrant]# yum install java
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.ca.planethoster.net
* epel: ftp.cse.buffalo.edu
* extras: mirror2.evolution-host.com
* updates: centos.mirror.ca.planethoster.net
Resolving Dependencies
--> Running transaction check
---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.161-3.b14.el6_9 will be installed
My question is: is Chef somehow running a different repo to the one I actually have on the machine? Why my cmd within the box shows different java versions to the one Chef is using?

So first we need to rewind a bit and work out what is the package name vs. version. Taking 1:java-1.8.0-openjdk-1.8.0.121-1.b13.el6.x86_64 : OpenJDK Runtime Environment as the example, the package name is java-1.8.0-openjdk and the version is 1:1.8.0.121-1.b13.el6.x86_64, more commonly just given as 1.8.0.121-1.b13. There is no package actually called java, it's a magic-y alias within Yum to do the right thing, but the alias confuses Chef since we query the package info database directly.
So what you want is more like this:
package 'java-1.8.0-openjdk' do
version '1.8.0.121-1.b13'
end
or something similar.

Related

Installing gcc on s390x

I need a C compiler on my s390, which runs RHEL 7.6. When I do "yum list | grep gcc", I have the following:
libgcc.s390x 4.8.5-36.el7
compat-gcc-44.s390x 4.4.7-8.el7
compat-gcc-44-c++.s390x 4.4.7-8.el7
gcc.s390x 4.8.5-16.el7
gcc-c++.s390x 4.8.5-16.el7
gcc-gfortran.s390x 4.8.5-16.el7
gcc-objc.s390x 4.8.5-16.el7
gcc-objc++.s390x 4.8.5-16.el7
libgcc.s390 4.8.5-16.el7
I then do: yum install gcc.s390x and I obtain the following error:
Error: Package: glibc-2.17-196.el7.s390
Requires: glibc-common = 2.17-196.el7
Installed: glibc-common-2.17-260.el7_6.3.s390x (#rhel-7-for-system-z-rpms)
glibc-common = 2.17-260.el7_6.3
Available: glibc-common-2.17-196.el7.s390x
glibc-common = 2.17-196.el7
What I read from this is that s390x package is installed but the one needed is the one that does not have the s390 extension.
How can I get around this ? I pulling gcc directly from git but when I do a configure the message says that a compiler needs to be installed.
Any help would be much appreciated. Thanks - C
This output line
Available: glibc-common-2.17-196.el7.s390x
shows that the configured repositories only contain glibc versions up to RHSA-2017:1916. This means that you have configured repositories for Red Hat Enterprise Linux 7.4 (and not even Extended Update Support). However, someone at one point upgraded glibc to a package version from Red Hat Enterprise Linux 7.6.
Installing GCC needs additional glibc components, and these have to match the already-installed version. Since the 7.6 packages are not available from the configured repositories, installation fails with a dependency error.
If you need assistance with subscription management, you should file a support ticket.

Issue installing Tax4Fun

I'm trying to install the package "Tax4Fun" but keep failing.
I've tried 2 different ways:
install.packages("devtools")
devtools::install_url("http://tax4fun.gobics.de/Tax4Fun/Tax4Fun_0.3.1.tar.gz")
library(Tax4Fun)
The error that I get is:
ERROR: dependency 'biom' is not available for package 'Tax4Fun'
I've also tried installing biom directly
BiocManager::install("biom")
which does not work either
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'biom'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘biom’ is not available (for R version 3.6.1)
The other way I've tried to install Tax4Fun directly is
BiocManager::install("Tax4Fun")
I get the following error code:
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.1 (2019-07-05)
Installing package(s) 'Tax4Fun'
Installation path not writeable, unable to update packages: boot, foreign, KernSmooth,
mgcv, nlme, survival
Warning message:
package ‘Tax4Fun’ is not available (for R version 3.6.1)
Please help :)
You need to install it by downloading the packages from source (http://tax4fun.gobics.de). Then it depends whether you are running on Linux/Mac or Windows.
From the command line, you navigate to the folder containing the .tar.gz downloaded package. Then you should install it using:
R CMD INSTALL Tax4Fun_0.3.1.tar.gz
But dependancies are not installed by default. So you need to install dependancies manually, Qiimer and Biom, which are both deprecated on Cran. You install them using the same command, after you have downloaded the packages from the Cran archives.
Before that, you need to also install their dependancies in R:
install.packages("pheatmap")
install.packages("RJSONIO")
Then you should be able to proceed as mentioned above: install Qiimer and Biom from the command line first. Then Tax4Fun from the command line too.
If you are running on Windows you should have quite the same issues, but the installation of the different packages and dependancies is different. You can have a look at the readme at http://tax4fun.gobics.de

Invalid parameter elasticsearch_package_name on Elasticsearch_plugin

OS : 'CentOS 6.5
'
ElasticSearch version : '2.3.0'
Master's puppet version: '3.8.7'
Client's puppet version : '3.7.4'
Base module version before upgrade : '0.10.2'
Base module version after upgrade : '5.1.0'
Error: could not retrieve catalog from remote server: Error 400 on
SERVER: invalid parameter elasticsearch_package_name on
Elasticsearch_plugin[license] at
/etc/puppet/environments/production/modules/elasticsearch/manifests/plugin.pp:169
on node bla-test01.dom'
Hi,
This error started after we upgraded our Elasticsearch's base (Official from puppet forge) module from version '0.10.2' to '5.1.0'. Our puppet module of elasticsearch worked just fine before the upgrade.
Since the upgrade this error occurred whenever puppet ran on our nodes.
After we saw this case we tried to restart our puppetserver service. Since the restart, the error occurs once every 3-4 runs of puppet and we have no idea why.
Looking at the elastic/elasticsearch module which is the one you seem to be using i can see that the elastic_plugin custom type did not have the elasticsearch_package_name parameter in version 0.11.0 however the 5.1.0 version does. This looks to me that you may have updated the module on the system but have not restarted the puppet server so it still has the 0.11.0 custom type/provider ruby files loaded.
Restart the puppet master server and see if that fixes the issue

error while installing snmp package in SUSE 11

I am trying to install SNMP package in SUSE Linux enterprise server 11. I downloaded net-snmp-5.6.1-3.3.x86_64.rpm and installed with the below command
UKGBDCESRPL048:/opt/packages # rpm -ivh --nodeps net-snmp-5.6.1-3.3.x86_64.rpm
warning: net-snmp-5.6.1-3.3.x86_64.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID 3dbdc284
Preparing...
##################################### [100%]
1:net-snmp
##################################### [100%]
Updating /etc/sysconfig/net-snmp...
But when I try to start snmpd service, I am getting an error below:
UKGBDCESRPL048:/opt/packages # /etc/init.d/snmpd start
Starting snmpd/usr/sbin/snmpd: error while loading shared libraries: libnetsnmpagent.so.25: cannot open shared object file: No such file or directory
startproc: exit status of parent of /usr/sbin/snmpd: 127
Please help me to properly install SNMP package.
Why are you trying to install the RPM with --nodeps? This breaks your RPM dependencies! Please remove the package again and try to install it without that option. This should fail with a list of additionally required RPM's.
You'll have to install them, too. BTW, I'm sure that at least the RPM libsnmp15 is missing, because libnetsnmpagent.so.25 is in there.
You could also configure SLES to use one or more (online) repositories after registering your machine with a license key. After that, a simple
zypper in net-snmp
should solve all dependencies automatically.
One more thing: net-snmp-5.6.1-3.3.x86_64.rpm doesn't seem to be a valid SLES 11 package. Latest version (even SP4) is 5.4.2.1-8.12.24.1. Where did you get the RPM from? Just wondering...

I'm trying install rpm package but i not able to install rpm

I'm using CentOS Linux release 6.0 (Final) but unable install given package
1) rpm -ivh oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm
Whenever i install package,I got following error
error: Failed dependencies:
oracle-instantclient11.2-basic >= 11.2.0.1.0 is needed by oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64
2)rpm -ivh oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm
Whenever i install package,I got following error
error: Failed dependencies:
oracle-instantclient11.2-basic >= 11.2.0.1.0 is needed by oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64
From the instant client information page:
Installation Instructions
Installation Steps:
Download the appropriate Instant Client packages for your platform. All installations REQUIRE the Basic or Basic Lite package.
...
That is referring to the .zip version, but the same will apply to the .rpm version.
So you need to get and install the oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm or oracle-instantclient11.2-basiclite-11.2.0.1.0-1.x86_64.rpm (Basic Lite: Smaller version of the Basic, with only English error messages and Unicode, ASCII, and Western European character set support) before you can install the -devel- package on top.
Kind of curious that you're installing the 11.2.0.1 version (or 11.2.0.3 from your first error message, despite the command you showed) when more recent versions are available. I assume you're getting your .rpm files from the download site. I'd get the 11.2.0.4 version, if not the 12.0.0.1 version, unless you have a specific reason to stick to an older one. I would get the same version for basic and devel though, despite the message suggesting they don't have to match. So oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm (or basiclite) if you're sticking with oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm.

Resources