Is there another method of removing and reinstalling/updating stackdriver-agent after pinning it to a certain version beyond removing to reinstall the latest?
stackdriver-agent.x86_64 5.5.2-1001.el7
stackdriver-agent.x86_64 5.5.2-1002.el7
Running "install -y stackdriver-agent" still uses stackdriver-agent.x86_64 0:5.5.2-1002.el7 even after "remove stackdriver-agent".
Is there a config file to make this change before pulling/installing the latest version which is 6.*?
The ONLY way I was able to get the new version installed was to remove from all prod systems the logging agent first, then the agent, then reinstall.
stackdriver-agent.x86_64 0:6.0.5-1.el7
Try going over the "Installing the Cloud Monitoring agent on a single VM" documentation which I've went through.
I was able to install, start, stop, remove and install another version of the agent.
Here's how I did it (using CentOS 6 box):
I've created a new CentOS 6 VM, added agent's repository to package list:
[wbogacz#centos ~]$ curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh
[wbogacz#centos ~]$ sudo bash add-monitoring-agent-repo.sh
Adding agent repository for Red Hat.
Then listed all available versions for this OS:
[wbogacz#centos ~]$ sudo yum list --showduplicates stackdriver-agent
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.eu.oneandone.net
* centos-sclo-rh: ftp.plusline.net
* centos-sclo-sclo: mirror.infonline.de
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: ftp.plusline.net
* updates: ftp.plusline.net
google-cloud-monitoring/signature | 454 B 00:00
google-cloud-monitoring/signature | 1.4 kB 00:00 ...
Installed Packages
stackdriver-agent.x86_64 5.5.2-1002.el6 #google-cloud-monitoring
Available Packages
stackdriver-agent.x86_64 5.5.2-1001.el6 google-cloud-monitoring
stackdriver-agent.x86_64 5.5.2-1002.el6 google-cloud-monitoring
Version 6 of the agent is not available for CentOS 6 (it shows in CentOS 8).
I then installed 1001 version:
Loading mirror speeds from cached hostfile
* base: mirror.eu.oneandone.net
* centos-sclo-rh: ftp.plusline.net
* centos-sclo-sclo: mirror.infonline.de
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: ftp.plusline.net
* updates: ftp.plusline.net
Resolving Dependencies
--> Running transaction check
---> Package stackdriver-agent.x86_64 0:5.5.2-1001.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
stackdriver-agent x86_64 5.5.2-1001.el6 google-cloud-monitoring 1.3 M
Transaction Summary
================================================================================================================
Install 1 Package(s)
Total download size: 1.3 M
Installed size: 4.9 M
Downloading Packages:
85f2f9343af9e0c4669fb9214584c8d4c2ccacfd0a5559e7d980bc4ae85babc6-stackdriver-agent-5.5.2 | 1.3 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : stackdriver-agent-5.5.2-1001.el6.x86_64 1/1
Verifying : stackdriver-agent-5.5.2-1001.el6.x86_64 1/1
Installed:
stackdriver-agent.x86_64 0:5.5.2-1001.el6
Complete!
Listed installed agent's again and got nothing:
[wbogacz#centos ~]$ sudo yum list installed | grep stack
stackdriver-agent.x86_64
Started the agent:
[wbogacz#centos ~]$ sudo service stackdriver-agent start
Starting stackdriver-collectd: option = Interval; value = 60.000000;
option = Hostname; value = ;
option = FQDNLookup; value = false;
Created new plugin context.
option = PIDFile; value = /var/run/stackdriver-agent.pid;
option = Interval; value = 60.000000;
option = Hostname; value = ;
option = FQDNLookup; value = false;
Created new plugin context.
Remove the agent
[wbogacz#centos ~]$ sudo yum remove stackdriver-agent
Loaded plugins: fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package stackdriver-agent.x86_64 0:5.5.2-1001.el6 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Removing:
stackdriver-agent x86_64 5.5.2-1001.el6 #google-cloud-monitoring 4.9 M
Transaction Summary
================================================================================================================
Remove 1 Package(s)
Installed size: 4.9 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing : stackdriver-agent-5.5.2-1001.el6.x86_64 1/1
Verifying : stackdriver-agent-5.5.2-1001.el6.x86_64 1/1
Removed:
stackdriver-agent.x86_64 0:5.5.2-1001.el6
Complete!
Install 1002 version:
Loading mirror speeds from cached hostfile
* base: mirror.eu.oneandone.net
* centos-sclo-rh: ftp.plusline.net
* centos-sclo-sclo: mirror.infonline.de
* epel: d2lzkl7pfhq30w.cloudfront.net
* extras: ftp.plusline.net
* updates: ftp.plusline.net
Resolving Dependencies
--> Running transaction check
---> Package stackdriver-agent.x86_64 0:5.5.2-1002.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================
Package Arch Version Repository Size
================================================================================================================
Installing:
stackdriver-agent x86_64 5.5.2-1002.el6 google-cloud-monitoring 1.3 M
Transaction Summary
================================================================================================================
Install 1 Package(s)
Total download size: 1.3 M
Installed size: 4.9 M
Downloading Packages:
2a595a0373346006564e3ddc1a15101460b78d72936b11ba177ac956b125cca2-stackdriver-agent-5.5.2 | 1.3 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : stackdriver-agent-5.5.2-1002.el6.x86_64 1/1
Verifying : stackdriver-agent-5.5.2-1002.el6.x86_64 1/1
Installed:
stackdriver-agent.x86_64 0:5.5.2-1002.el6
Complete!
Check installed version:
[wbogacz#centos ~]$ rpm --query --queryformat '%{NAME} %{VERSION} %{RELEASE} %{ARCH}\n' \
> stackdriver-agent
stackdriver-agent 5.5.2 1002.el6 x86_64
Related
So something strange happened this week and I'm not sure if it's only me. When I create a new EC2 instance with CentOS 7 from the Marketplace ( CentOS 7 (x86_64) - with Updates HVM ) and I try to install nodejs I am getting the error that nodejs package is not found. Of course prior to installing nodejs I am installing epel-release as nodejs is a part of this package.
Error output bellow:
[root#ip-172-31-15-245 centos]# yum install epel-release -y`
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: download.cf.centos.org
* extras: download.cf.centos.org
* updates: download.cf.centos.org
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/4): extras/7/x86_64/primary_db | 243 kB 00:00:00
(2/4): base/7/x86_64/group_gz | 153 kB 00:00:00
(3/4): updates/7/x86_64/primary_db | 13 MB 00:00:00
(4/4): base/7/x86_64/primary_db | 6.1 MB 00:00:01
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================
Installing:
epel-release noarch 7-11 extras 15 k
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total download size: 15 k
Installed size: 24 k
Downloading packages:
warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for epel-release-7-11.noarch.rpm is not installed
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security#centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-7.1908.0.el7.centos.x86_64 (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-11.noarch 1/1
Verifying : epel-release-7-11.noarch 1/1
Installed:
epel-release.noarch 0:7-11
Complete!
`[root#ip-172-31-15-245 centos]# yum install nodejs`
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 32 kB 00:00:00
* base: download.cf.centos.org
* epel: mirror.23m.com
* extras: download.cf.centos.org
* updates: download.cf.centos.org
epel | 4.7 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/3): epel/x86_64/group_gz | 96 kB 00:00:00
(3/3): epel/x86_64/primary_db | 7.0 MB 00:00:00
No package nodejs available.
Error: Nothing to do
Does anyone else experience the same issue?
Tried using nvm but does suit me so I'm looking for any advice?
Some other users have been having problems with EPEL and Node.js on CentOS 7. Can you download the tarball and try to install it manually (I would use the default user's account instead of root, though):
NOTE - Tested on CentOS 7.9
wget https://nodejs.org/dist/latest/node-v17.4.0-linux-x64.tar.gz -P /home/<default user>/Downloads
cd /home/<default user>/Downloads
sudo tar -C /usr/local --strip-components 1 -xzf node*.tar.gz
I tried following the instructions on nodesource by running these commands as root:
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs
But when I run node -v afterward I can see that it only installed 0.10.48. I can see in the output of the second command that it's selecting the wrong version of the package for download:
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: mirror.steadfast.net
* remi: repo1.sea.innoscale.net
* remi-safe: repo1.sea.innoscale.net
2418 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.48-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================
Installing:
nodejs x86_64 0.10.48-3.el6 epel 2.1 M
Transaction Summary
=========================================================================================================================================================================================
Install 1 Package(s)
Total download size: 2.1 M
Installed size: 7.1 M
Downloading Packages:
nodejs-0.10.48-3.el6.x86_64.rpm | 2.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : nodejs-0.10.48-3.el6.x86_64 1/1
Verifying : nodejs-0.10.48-3.el6.x86_64 1/1
Installed:
nodejs.x86_64 0:0.10.48-3.el6
Complete!
I've tried uninstalling with yum remove -y nodejs npm and then running rm -fv /etc/yum.repos.d/nodesource*, yum clean all, yum update and then reinstalling but nothing seems to work.
Why doesn't it resolve to the v8 package?
I had the same problem few days ago and I was not able to install Node version 8 via the nodesource repository.
In fact, there is no setup_8.x script in the rpm repository yet.
I end up with n package to get Node version 8:
# yum install nodejs // you need to have npm installed
# npm install -g n
# n stable
# node -v // v8.4.0
I am trying to install GitLab on my dedicated server with no luck.
Server info:
CENTOS 6.7 x86_64 standard
WHM 11.52.1 (build 2)
I tried this guide, but I keep getting the following error:
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.ca.planethoster.net
* epel: mirrors.mit.edu
* extras: centos.mirror.iweb.ca
* updates: centos.mirrors.atwab.net
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-6.el6_7.1 will be installed
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-6.el6_7.1.x86_64
--> Finished Dependency Resolution
Error: Package: 2:postfix-2.6.6-6.el6_7.1.x86_64 (updates)
Requires: mysql-libs
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
When I run the following command:
sudo yum install postfix
I get the following error:
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 12 kB 00:00
* base: centos.mirror.iweb.ca
* epel: mirrors.mit.edu
* extras: centos.mirrors.atwab.net
* updates: centos.mirror.netelligent.ca
base | 3.7 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.8 MB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 2.6 MB 00:00
virtualbox/signature | 198 B 00:00
virtualbox/signature | 951 B 00:00 ...
No package mysql-libs available.
Error: Nothing to do
When I run the following command:
sudo yum install mysql-libs
What I eventually did was skip the installation of postfix. I skipped it like so:
sudo yum install --skip-broken curl openssh-server openssh-clients postfix cronie
Then I edited the gitlab.rb config file using something like nano:
nano /etc/gitlab/gitlab.rb
and changed the external_url' and added to it a random unused port number:
external_url 'http://example.com:8443/'
then run
sudo gitlab-ctl reconfigure
for the change to take effect.
Voila it works.
It looks like a common problem with CentOS. Similar question has been answered here on fixing the yum install postfix and missing mysql-libs.
NOTE: Since I can't comment I will provide this as an answer and update based on any comments.
I suggest you use the Bitnami one-click install GitLab. It's very easy to install GitLab.
More info : https://bitnami.com/stack/gitlab
and Wiki is : https://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_address_for_GitLab.3f
Loaded plugins: fastestmirror, refresh-packagekit Loading mirror speeds from cached hostfile * base: ftp.osuosl.org * extras: centosy3.centos.org * rpmforge: repoforge.mirror.constant.com * updates: centosu5.centos.org datastax | 951 B 00:00 Setting up Install Process No package dsc20 available.
As Orajinder pointed out you need to do the following:
Add the repo to your list of supported repositories:
sudo vim /etc/yum.repos.d/datastax.repo
[datastax]
name= DataStax Repo for Apache Cassandra
baseurl=http://rpm.datastax.com/community
enabled=1
gpgcheck=0
Then install
sudo yum install dsc20
I'm trying to install Sphinx search on a CentOS VPS via SSH but I keep getting dependency issues that I can't seem to resolve.
Here's the OS I'm using:
cat /etc/redhat-release
CentOS 6.4 (Final)
uname -a
Linux host.example.com 2.6.32-042stab074.10 #1 SMP Fri Mar 1 09:18:44 MSK 2013 i686 i686 i386 GNU/Linux
This to me looks like I need the 32-bit CentOS 6 rpm so I tried to install it with this command:
sudo yum install http://sphinxsearch.com/files/sphinx-2.0.8-1.rhel6.i386.rpm
but I get the following error message:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.advancedhosters.com
* extras: centos.mirror.constant.com
* updates: mirror.lug.udel.edu
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
updates | 3.4 kB 00:00
Setting up Install Process
sphinx-2.0.8-1.rhel6.i386.rpm | 5.6 MB 00:30
Examining /var/tmp/yum-root-oMekz6/sphinx-2.0.8-1.rhel6.i386.rpm: sphinx-2.0.8-1.rhel6.i386
Marking /var/tmp/yum-root-oMekz6/sphinx-2.0.8-1.rhel6.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package sphinx.i386 0:2.0.8-1.rhel6 will be installed
--> Processing Dependency: libmysqlclient.so.16 for package: sphinx-2.0.8-1.rhel6.i386
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: sphinx-2.0.8-1.rhel6.i386
--> Finished Dependency Resolution
Error: Package: sphinx-2.0.8-1.rhel6.i386 (/sphinx-2.0.8-1.rhel6.i386)
Requires: libmysqlclient.so.16
Error: Package: sphinx-2.0.8-1.rhel6.i386 (/sphinx-2.0.8-1.rhel6.i386)
Requires: libmysqlclient.so.16(libmysqlclient_16)
You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0', '8.14.4', '8.el6')
No matter what I try I always seem to be missing libmysqlclient.so.16.
Any idea where I can find this package?
yum install mysql-devel
should do it.
Install the remi repository:
[http://blog.famillecollet.com/pages/Config-en]
Enterprise Linux 6 (with EPEL) i386 or x86_64
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
then install compat-mysql51
yum --enablerepo=remi install compat-mysql51
then install sphinx from the rpm downloaded
yum localinstall sphinx-2.1.2-1.rhel6.SYSTEM-VERSION.rpm
Use the SphinxSearch docker files (docker hub link) to easily install SphinxSearch.
Grab it:
docker pull leodido/sphinxsearch:latest
If you want to see how to compile from source (which I recommend as the better mode to install SphinxSearch), look into them - e.g., here.