Amazon Linux AMI 2018.03 - google cloud sdk install - google-cloud-sdk

Official doc for google cloud sdk said
Update YUM with Cloud SDK repo information
Install the Cloud SDK
But when I followed instruction Error Requires: python2 >= 2.7 occurs.
$ sudo yum install google-cloud-sdk
Loaded plugins: priorities, update-motd, upgrade-helper
4 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package google-cloud-sdk.noarch 0:206.0.0-1.el7 will be installed
--> Processing Dependency: python2 >= 2.7 for package: google-cloud-sdk-206.0.0-1.el7.noarch
--> Finished Dependency Resolution
Error: Package: google-cloud-sdk-206.0.0-1.el7.noarch (google-cloud-sdk)
Requires: python2 >= 2.7
Available: python26-2.6.9-2.89.amzn1.x86_64 (amzn-main)
python2 = 2.6.9-2.89.amzn1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I know that I could install SDK with tar.gz But How can I solve this if I only want to use rpm. Any pointer would be appreciated.

Install yum downloader:
# yum install yum-utils
Download the RPM:
# yumdownloader google-cloud-sdk-231.0.0-1.el7.noarch
Move and install the RPM with "--nodeps":
# mv 4c714e030c915-google-cloud-sdk-231.0.0-1.el7.noarch.rpm /usr/local/src/google-cloud-sdk-231.0.0-1.el7.noarch
# rpm -ivh --nodeps /usr/local/src/google-cloud-sdk-231.0.0-1.el7.noa

The error you are getting is due to a dependency on python that your OS is not addressing, you would need to update. I would direct you to Can't install gcloud on Amazon Linux : invalid syntax as this seems to be regarding the same issue, and the solution may help you.

Related

I am not able to install package using my hosted repository

yum -d0 -e0 -y --disablerepo\=\* --enablerepo\=my-repo-name install ksh-20120801-34.el7
gives:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Error downloading packages:
ksh-20120801-34.el7.x86_64: [Errno 256] No more mirrors to try.
though "ksh-20120801-34.el7" is available in the repo I am getting the above error.
I have tried cleaning up, disabling and enabling of repo but still no luck . Any help on this could be much appreciated.
One step to debug it would be to list the repo and see what is on the list:
# yum --disablerepo=* --enablerepo=my-repo-name list | grep ksh
You can also try without 20120801-34.el7 suffix. So the command would be the following:
yum -d0 -e0 -y --disablerepo=* --enablerepo=my-repo-name install ksh
[root#ms-node0101 ~]# yum install -y ksh.el7
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package ksh.el7 available.
Error: Nothing to do
[root#ms-node0101 ~]# yum install ksh-20120801-139
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package ksh-20120801-139 available.
Error: Nothing to do
[root#ms-node0101 ~]# yum install -y ksh
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package ksh.x86_64 0:20120801-139.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================================================================
Installing:
ksh x86_64 20120801-139.el7 Local-Base 885 k
Transaction Summary
=============================================================================================================================================================================================================================================
Install 1 Package
Total download size: 885 k
Installed size: 3.1 M
Downloading packages:
ksh-20120801-139.el7.x86_64.rpm | 885 kB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ksh-20120801-139.el7.x86_64 1/1
Verifying : ksh-20120801-139.el7.x86_64 1/1
Installed:
ksh.x86_64 0:20120801-139.el7
Complete!
Thanks everyone for trying to help me out here. In my case solution was simple and debug goes like below.
Was trying to wget the package from the repo. Though connection was successful i was not able to download the package.
2 . My team-mate analysed the mounts in the repo and we got to know that they were not mounted properly so he remounted filesystems and post that i was able to download and it solved the install step as well.

Yum Install Issue

I am trying to install g++ 4.1.2 (seems gcc 4.1.2 is already installed) in a Redhat Linux 6 machine. When I first tried running gcc-c++-4.1.2 rpm through yum, I get the following dependency issues,
[root#Cham1WS Desktop]# yum install gcc-c++-4.1.2-55.el5.x86_64.rpm
Setting up Install Process
Examining gcc-c++-4.1.2-55.el5.x86_64.rpm: gcc-c++-4.1.2-55.el5.x86_64
Marking gcc-c++-4.1.2-55.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.1.2-55.el5 will be installed
--> Processing Dependency: libstdc++ = 4.1.2-55.el5 for package: gcc-c++- 4.1.2-55.el5.x86_64
--> Processing Dependency: libstdc++-devel = 4.1.2-55.el5 for package: gcc-c++-4.1.2-55.el5.x86_64
--> Finished Dependency Resolution
Error: Package: gcc-c++-4.1.2-55.el5.x86_64 (/gcc-c++-4.1.2-55.el5.x86_64)
Requires: libstdc++-devel = 4.1.2-55.el5
Error: Package: gcc-c++-4.1.2-55.el5.x86_64 (/gcc-c++-4.1.2-55.el5.x86_64)
Requires: libstdc++ = 4.1.2-55.el5
Installed: libstdc++-4.4.7-16.el6.x86_64 (#anaconda- RedHatEnterpriseLinux-201507020259.x86_64/6.7)
libstdc++ = 4.4.4-15.el6
libstdc++ = 4.4.7-16.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
So, it seems I need to install libstdc++-devel-4.1.2-55.el5.x86_64.rpm. So I tried installing it and I get the follwoing dependencies,
[root#Cham1WS Desktop]# yum install libstdc++-devel-4.1.2-55.el5.x86_64.rpm
Setting up Install Process
Examining libstdc++-devel-4.1.2-55.el5.x86_64.rpm: libstdc++-devel-4.1.2-55.el5.x86_64
Marking libstdc++-devel-4.1.2-55.el5.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libstdc++-devel.x86_64 0:4.1.2-55.el5 will be installed
--> Processing Dependency: libstdc++ = 4.1.2-55.el5 for package: libstdc++-devel-4.1.2-55.el5.x86_64
--> Finished Dependency Resolution
Error: Package: libstdc++-devel-4.1.2-55.el5.x86_64 (/libstdc++-devel-4.1.2-55.el5.x86_64)
Requires: libstdc++ = 4.1.2-55.el5
Installed: libstdc++-4.4.7-16.el6.x86_64 (#anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7)
libstdc++ = 4.4.4-15.el6
libstdc++ = 4.4.7-16.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
It seems an earlier version of libstdc++ is already installed. Anyways, I tried installing libstdc++-4.1.2-55.el5.x86_64.rpm (not the "devel"), and it says it's already installed.
[root#Cham1WS Desktop]# yum install libstdc++-4.1.2-55.el5.x86_64.rpm
Setting up Install Process
Examining libstdc++-4.1.2-55.el5.x86_64.rpm: libstdc++-4.1.2-55.el5.x86_64
libstdc++-4.1.2-55.el5.x86_64.rpm: does not update installed package.
Error: Nothing to do
But if I try to install the "libstdc++-devel-4.1.2-55.el5.x86_64.rpm" I get the ealier dependencies again. It seems the issue is that I have a newer version of libstdc++ is already installed
1) How do I fix this issue?
2) Do I need to uninstall the later version of libstdc++?
It seems like you are using yum the wrong way: You should let yum connect to some repositories, and let him figure out the dependencies.
By the way you are installing el5 packages, that means packages for centos5, not centos6. Try finding similar packages but for centos6, that would be better; try using the epel repository which might help you (take a look here on how to enable it: https://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/)

install mod_ssl issue apache 2.4 aws linux

Using aws Linux . When I try to install mod_ssl its give a conflict error with ttpd-tools-2.2.31-1.8.amzn1.x86_64 and httpd-2.2.31-1.8.amzn1.x86_64. Tried yum remove but it's not working. When I do a yum list the old httpd version is not getting listed. Not sure why is it. Could anyone help me out regarding this.
[root#ip-61 ec2-user]# yum install mod_ssl
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package mod_ssl.x86_64 1:2.2.31-1.8.amzn1 will be installed
--> Processing Dependency: httpd = 2.2.31-1.8.amzn1 for package: 1:mod_ssl-2.2.31-1.8.amzn1.x86_64
--> Processing Dependency: httpd-mmn = 20051115 for package: 1:mod_ssl-2.2.31-1.8.amzn1.x86_64
--> Running transaction check
---> Package httpd.x86_64 0:2.2.31-1.8.amzn1 will be installed
--> Processing Dependency: httpd-tools = 2.2.31-1.8.amzn1 for package: httpd-2.2.31-1.8.amzn1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.31-1.8.amzn1.x86_64
--> Running transaction check
---> Package apr-util-ldap.x86_64 0:1.4.1-4.17.amzn1 will be installed
---> Package httpd-tools.x86_64 0:2.2.31-1.8.amzn1 will be installed
--> Processing Conflict: httpd24-2.4.18-1.64.amzn1.x86_64 conflicts httpd < 2.4.18
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package httpd24.x86_64 0:2.4.18-1.64.amzn1 will be updated
---> Package httpd24.x86_64 0:2.4.23-1.66.amzn1 will be an update
--> Processing Dependency: httpd24-tools = 2.4.23-1.66.amzn1 for package: httpd24-2.4.23-1.66.amzn1.x86_64
--> Running transaction check
---> Package httpd24-tools.x86_64 0:2.4.18-1.64.amzn1 will be updated
---> Package httpd24-tools.x86_64 0:2.4.23-1.66.amzn1 will be an update
--> Processing Conflict: httpd24-2.4.23-1.66.amzn1.x86_64 conflicts httpd < 2.4.23
--> Processing Conflict: httpd24-tools-2.4.23-1.66.amzn1.x86_64 conflicts httpd-tools < 2.4.23
--> Finished Dependency Resolution
Error: httpd24-tools conflicts with httpd-tools-2.2.31-1.8.amzn1.x86_64
Error: httpd24 conflicts with httpd-2.2.31-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root#ip-61 ec2-user]# yum l
[root#ip-61 ec2-user]# yum list installed | grep -in httpd
120:httpd24.x86_64 2.4.18-1.64.amzn1 #amzn-main
121:httpd24-tools.x86_64 2.4.18-1.64.amzn1 #amzn-main
[root#ip-61 ec2-user]# yum remove httpd-tools-2.2.31-1.8.amzn1.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: httpd-tools-2.2.31-1.8.amzn1.x86_64
No Packages marked for removal
[root#ip-61 ec2-user]# yum remove httpd-2.2.31-1.8.amzn1.x86_64
Loaded plugins: priorities, update-motd, upgrade-helper
No Match for argument: httpd-2.2.31-1.8.amzn1.x86_64
No Packages marked for removal
[root#ip-61 ec2-user]#
]# yum list installed | grep -in httpd
120:httpd24.x86_64 2.4.18-1.64.amzn1 #amzn-main
121:httpd24-tools.x86_64 2.4.18-1.64.amzn1 #amzn-main
Basically: sudo yum install mod24_ssl
Not taking credit for this though, see: https://stackoverflow.com/a/21781886
You can use the following command
yum install mod24_ssl.x86_64
It will be installing mod_ssl without any dependency conflicts.
I suspect you have something like cpanel or plesk or directadmin installed, they added a bunch of exclude= lines to /etc/yum.conf, ex:
exclude=apache* httpd* mod_* mysql* MySQL* mariadb* da_* *ftp* exim* sendmail* php* bind-chroot*
and stop various packages from being installed. They do this because they supply their own versions of many central CentOS packages and want to stop the CentOS ones from overwriting them. Once you install a web panel like this, you have changed the way the system operates and you have to go to them to ask how to install things as the normal CentOS ways would end up breaking their other installed packages.
I found this answer on internet
Try to re-install using
yum remove < all listed packages>
yum install mod_ssl

Phalcon 3 - Centos 7 Cpanel EasyApache 4 - php5.6

I am trying to install Phalcon with:
curl -s https://packagecloud.io/install/repositories/phalcon/stable/script.rpm.sh | sudo bash
yum install php56u-phalcon
but I get dependency errors:
Error: Package: php56u-phalcon-3.0.1-14.ius.el7.centos.x86_64 (phalcon_stable)
Requires: php56u-pdo(x86-64)
Error: Package: php56u-phalcon-3.0.1-14.ius.el7.centos.x86_64 (phalcon_stable)
Requires: php56u-common(x86-64)
Error: Package: php56u-phalcon-3.0.1-14.ius.el7.centos.x86_64 (phalcon_stable)
Requires: php56u(api) = 20131106
Error: Package: php56u-phalcon-3.0.1-14.ius.el7.centos.x86_64 (phalcon_stable)
Requires: php56u(zend-abi) = 20131226
These libraries are installed but with the modifier "ea-" of easy apache.
How I can install Phalcon 3 in Centos 7 cpanel easyapache 4?
Thanks in advance.
Seems like phalcon expecting you to have php56 from ius repository.
I've had same error, but because my php56 came from remi repo instead I had no modifier on php* packages, for example php-pdo package instead of php56u-pdo.
I've solved it this way:
yum install php-phalcon3
(can be php-phalcon2, php7-php-palcon3 and so on - see yum search phalcon)
In your case this probably won't help, because you have ea- modifier on php*.
Possibly somebody more experienced with yum could suggest how to solve this conflict. But you still have two more options:
compile phalcon.so from source code (described here: https://github.com/phalcon/cphalcon).
install php from ius Centos 7 repository.
UPD: I must add that I was unable to make phalcon (php-phalcon* from remi dedicated repos for php5.6 and php7) to work - I've got "child pid exit signal Segmentation fault".
As a general rule: your phalcon package should be from the same repo from which you've installed php and php-* packages(e.g. php-mysqlnd, php-pdo).
In my opinion, if you wnat to be sure that your library will work on particular machine the best way is to compile it on this or similar machine.

Installing rabbitmq on centos7

I am trying to install rabbotmq on centos7.
Following the official instructions, I ran:
sudo yum install rabbitmq-server-3.5.1-1.noarch.rpm
and I get this error:
Loaded plugins: fastestmirror
Examining rabbitmq-server-3.5.1-1.noarch.rpm: rabbitmq-server-3.5.1-1.noarch
Marking rabbitmq-server-3.5.1-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.5.1-1 will be installed
--> Processing Dependency: erlang >= R13B-03 for package: rabbitmq-server-3.5.1-1.noarch
http://repos.fedorapeople.org/repos/peter/erlang/epel-7/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
Loading mirror speeds from cached hostfile
* base: centos.mirrors.hoobly.com
* extras: linux.mirrors.es.net
* updates: mirror.pac-12.org
--> Finished Dependency Resolution
Error: Package: rabbitmq-server-3.5.1-1.noarch (/rabbitmq-server-3.5.1-1.noarch)
Requires: erlang >= R13B-03
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
then I tried installing erlang with the instructions from:
Installing rabbitmq-server on RHEL
It seemed to have been installed, but my rabbitmq installation still fails with the same message.
Any ideas how to fix the problem?
Following the instruction lead me to error: No package rabbitmq-server-3.6.1-1.noarch.rpm available.
Then I simply tried: yum install rabbitmq-server, it works for me.
Or checkout this one: Rabbitmq at Digitalocean - I used to config web monitoring on my server.
This is something that I've fought with, and found that the best solution is to install Erlang and RabbitMQ from standalone RPMs outside of yum; see Install Erlang in RMQ's documentation. Specifically, the stripped-down Erlang install provided by RabbitMQ (see here) should install easily, then allow you to install RMQ from an RPM downloaded from the RabbitMQ site. If that package doesn't work, then try the Erlang distributions from Erlang Solutions.
Here is the ansible playbook i used to install rabbitmq on CentOS 7.
- name: install epel-release
yum: name=epel-release state=latest
tags: erlang
- name: install erlang from EPEL
yum: name=erlang state=latest
tags: erlang
- name: install new rabbitmq
yum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm state=present