az cli version failing with error required python3 even if 3.8.1/3.6.4 installed - azure-cli

Hi team ,we have python 3.6.4 /3.8.1 installed however we are not
able install az cli 2.14
python
Python 3.6.4 (default, Oct 29 2020, 22:55:45) [GCC 4.8.5 20150623
(Red Hat 4.8.5-28)] on linux Type "help", "copyright", "credits" or
"license" for more information.
below are the symlink created in /usr/bin/
ls -lrt |grep python
-rwxr-xr-x. 1 root root 11312 Apr 27 2018 abrt-action-analyze-python
-rwxr-xr-x. 1 root root 7216 Jul 13 2018 python2.7 lrwxrwxrwx. 1 root root 15 Oct 21 21:20
ambari-python-wrap -> /usr/bin/python lrwxrwxrwx. 1 root root
24 Oct 29 22:23 python3 -> /usr/local/bin/python3.6 lrwxrwxrwx. 1
root root 7 Oct 29 22:23 python -> python3 lrwxrwxrwx. 1
root root 9 Oct 29 23:20 python2 -> python2.7
we followed below steps https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest
error
sudo yum install azure-cli
Loaded plugins: fastestmirror, langpacks Repository epel is listed
more than once in the configuration Loading mirror speeds from
cached hostfile
epel: ftp.plusline.net Resolving Dependencies
--> Running transaction check
---> Package azure-cli.x86_64 0:2.13.0-1.el7 will be upd
List item
ated
---> Package azure-cli.x86_64 0:2.14.0-1.el7 will be an update
--> Processing Dependency: python3 for package: azure-cli-2.14.0-1.el7.x86_64
--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: azure-cli-2.14.0-1.el7.x86_64
List item
--> Running transaction check
---> Package azure-cli.x86_64 0:2.14.0-1.el7 will be an update
--> Processing Dependency: python3 for package: azure-cli-2.14.0-1.el7.x86_64
---> Package python36-libs.x86_64 0:3.6.8-2.el7.ius will be installed
--> Processing Dependency: python(abi) = 3.6 for package: python36-libs-3.6.8-2.el7.ius.x86_64
--> Running transaction check
---> Package azure-cli.x86_64 0:2.14.0-1.el7 will be an update
--> Processing Dependency: python3 for package: azure-cli-2.14.0-1.el7.x86_64
---> Package python36.x86_64 0:3.6.8-2.el7.ius will be installed
--> Finished Dependency Resolution Error: Package: azure-cli-2.14.0-1.el7.x86_64 (azure-cli)
Requires: python3 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows: azure-cli-2.13.0-1.el7.x86_64 has missing requires of
libpython3.6m.so.1.0()(64bit) azure-cli-2.13.0-1.el7.x86_64 has
missing requires of python3
We are trying to upgrade from az cli 2.13 which has other issues
that we aare trying to avoid.

Related

How do I specify a repo for yum install in aws beanstalk file install_packages.config?

I need to install sshpass on my AWS beanstalk when it is deployed.
I created a new clone to check that I could do it from the ssh shell command line and found that unless I specified the epel repo, it would not find the package:
$ sudo yum -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package sshpass available.
Error: Nothing to do
but this works:
$ sudo yum --enablerepo=epel -y install sshpass
Failed to set locale, defaulting to C
Loaded plugins: priorities, update-motd, upgrade-helper
1070 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package sshpass.x86_64 0:1.06-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================
Installing:
sshpass x86_64 1.06-1.el6 epel 20 k
Transaction Summary
==================================================================================================================================================================
Install 1 Package
Total download size: 20 k
Installed size: 34 k
Downloading packages:
sshpass-1.06-1.el6.x86_64.rpm | 20 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : sshpass-1.06-1.el6.x86_64 1/1
Verifying : sshpass-1.06-1.el6.x86_64 1/1
Installed:
sshpass.x86_64 0:1.06-1.el6
Complete!
So how would I do this in the .ebextensions/-1-packages/install-packages.config file?
The syntax is defined in the AWS example as follows:
packages:
yum:
libmemcached: []
ruby-devel: []
gcc: []
rpm:
epel: http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rubygems:
chef: '0.10.2'
But I'm not sure how to implement that for my case where i just want to tell it to use the epel repo
packages:
yum:
...
...
sshpass: []
I'm guessing the above won't automatically cause it to use the epel repo?
There might be a better way, but this worked:
commands:
24-sshpass:
command: "yum --enablerepo=epel -y install sshpass"

libncurses.so.5 - cannot open shared library, Fedora

I am getting this error when I try to run a 64-bit program on a new 64-bit Fedora 28 installation.
I have tried to install the ncurses library these ways:
sudo yum install ncurses-libs
sudo dnf install ncurses-devel
yum provides libncurses.so.5
There is no file called libncurses.so.5 anywhere on the filesystem. There is a file in /usr/lib64 call libncurses.so.6 and I tried renaming this to 5 but then it says libtinfo.so.5 is missing.
I get this:
[username#localhost project]$ ./main ./demo.conf
./main: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
These are my commands and their output:
[username#localhost ~]$ sudo yum install ncurses-devel
[sudo] password for username:
Fedora 28 - x86_64 371 kB/s | 60 MB 02:46
Last metadata expiration check: 0:01:24 ago on Sat 04 Aug 2018 09:34:19 PM PDT.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
ncurses-devel x86_64 6.1-5.20180224.fc28 updates 527 k
Upgrading:
ncurses x86_64 6.1-5.20180224.fc28 updates 377 k
ncurses-base noarch 6.1-5.20180224.fc28 updates 80 k
ncurses-libs x86_64 6.1-5.20180224.fc28 updates 307 k
Installing dependencies:
ncurses-c++-libs x86_64 6.1-5.20180224.fc28 updates 54 k
Transaction Summary
================================================================================
Install 2 Packages
Upgrade 3 Packages
Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): ncurses-c++-libs-6.1-5.20180224.fc28.x86 51 kB/s | 54 kB 00:01
(2/5): ncurses-base-6.1-5.20180224.fc28.noarch. 65 kB/s | 80 kB 00:01
(3/5): ncurses-libs-6.1-5.20180224.fc28.x86_64. 127 kB/s | 307 kB 00:02
(4/5): ncurses-devel-6.1-5.20180224.fc28.x86_64 152 kB/s | 527 kB 00:03
(5/5): ncurses-6.1-5.20180224.fc28.x86_64.rpm 234 kB/s | 377 kB 00:01
--------------------------------------------------------------------------------
Total 296 kB/s | 1.3 MB 00:04
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Upgrading : ncurses-base-6.1-5.20180224.fc28.noarch 1/8
Upgrading : ncurses-libs-6.1-5.20180224.fc28.x86_64 2/8
Installing : ncurses-c++-libs-6.1-5.20180224.fc28.x86_64 3/8
Installing : ncurses-devel-6.1-5.20180224.fc28.x86_64 4/8
Upgrading : ncurses-6.1-5.20180224.fc28.x86_64 5/8
Cleanup : ncurses-6.1-4.20180224.fc28.x86_64 6/8
Cleanup : ncurses-libs-6.1-4.20180224.fc28.x86_64 7/8
Cleanup : ncurses-base-6.1-4.20180224.fc28.noarch 8/8
Running scriptlet: ncurses-base-6.1-4.20180224.fc28.noarch 8/8
Verifying : ncurses-devel-6.1-5.20180224.fc28.x86_64 1/8
Verifying : ncurses-c++-libs-6.1-5.20180224.fc28.x86_64 2/8
Verifying : ncurses-libs-6.1-5.20180224.fc28.x86_64 3/8
Verifying : ncurses-base-6.1-5.20180224.fc28.noarch 4/8
Verifying : ncurses-6.1-5.20180224.fc28.x86_64 5/8
Verifying : ncurses-6.1-4.20180224.fc28.x86_64 6/8
Verifying : ncurses-base-6.1-4.20180224.fc28.noarch 7/8
Verifying : ncurses-libs-6.1-4.20180224.fc28.x86_64 8/8
Installed:
ncurses-devel.x86_64 6.1-5.20180224.fc28
ncurses-c++-libs.x86_64 6.1-5.20180224.fc28
Upgraded:
ncurses.x86_64 6.1-5.20180224.fc28
ncurses-base.noarch 6.1-5.20180224.fc28
ncurses-libs.x86_64 6.1-5.20180224.fc28
Complete!
[username#localhost project]$ sudo yum install ncurses-libs
Last metadata expiration check: 0:05:45 ago on Sat 04 Aug 2018 09:34:19 PM PDT.
Package ncurses-libs-6.1-5.20180224.fc28.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[username#localhost project]$ yum provides libncurses.so.5
Fedora 28 - x86_64 3.1 MB/s | 60 MB 00:19
Last metadata expiration check: 0:00:28 ago on Sat 04 Aug 2018 09:48:51 PM PDT.
ncurses-compat-libs-6.1-5.20180224.fc28.i686 : Ncurses compatibility libraries
Repo : updates
Matched from:
Provide : libncurses.so.5
ncurses-compat-libs-6.1-4.20180224.fc28.i686 : Ncurses compatibility libraries
Repo : fedora
Matched from:
Provide : libncurses.so.5
Try to install ncurses-compat-libs.
You would first use
dnf provides */libncurses.so.5
which can help you find a package that provides the file, and then install the respective package,
dnf install ncurses-compat-libs
in this case.
Just try to install the libncurses5 library:
apt install libncurses5
For more information, see this Reddit post.
I was able to solve this bug by installing that package.
For centos 8, encountered during couchbase install
dnf search libncurses
You will see list of packages with libcurses, you no need to download and install rpm package from official repo, just install from comand line only
sudo yum install ncurses-compat-libs

CentOS error while compiling Bind with DLZ "/usr/bin/ld: cannot find -lmysqlclient"

So I am trying to compile Bind with DLZ ( mysql ) support on CentOS 7
After doing
./configure --prefix=/usr --sysconfdir=/etc/bind --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-largefile --with-libtool --enable-shared --enable-static --with-openssl=/usr --with-gssapi=/usr --with-gnu-ld --with-dlz-postgres=no --with-dlz-mysql=yes --with-dlz-bdb=no --with-dlz-filesystem=yes --with-dlz-stub=yes --enable-ipv6
and
make
I get the error:
/opt/bind/bind-9.11.0-P3/lib/isc/.libs/libisc.so ../../lib/isc/.libs/libisc.so -lcrypto -L/usr/lib/mysql -lmysqlclient -lcrypt -lm -ldl -lz -lpthread
/usr/bin/ld: cannot find -lmysqlclient
collect2: error: ld returned 1 exit status
make[2]: *** [named] Error 1
make[2]: Leaving directory `/opt/bind/bind-9.11.0-P3/bin/named'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/opt/bind/bind-9.11.0-P3/bin'
make: *** [subdirs] Error 1
I have gotten it to work on one CentOS 7 box, however I installed all sorts of whacky stuff while trying to get it to work. I don't actually know why it compiles on that machine, and I would like to be able to replicate the process. So I created a fresh install of CentOS 7 and try and find out how to compile Bind with DLZ support. Bind 9.11.0-P3.
I have mariadb-libs installed and the /usr/lib64/mysql directory looks like this.
ll /usr/lib64/mysql/
total 16884
-rw-r--r--. 1 root root 2687 Nov 14 15:15 INFO_BIN
-rw-r--r--. 1 root root 170 Sep 12 2016 INFO_SRC
lrwxrwxrwx. 1 root root 17 Mar 29 16:40 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx. 1 root root 20 Mar 29 16:40 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx. 1 root root 24 Mar 29 16:40 libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
-rwxr-xr-x. 1 root root 3135736 Nov 14 15:17 libmysqlclient.so.18.0.0
lrwxrwxrwx. 1 root root 15 Mar 29 16:40 libmysqld.so -> libmysqld.so.18
-rwxr-xr-x. 1 root root 14116296 Nov 14 15:17 libmysqld.so.18
-rwxr-xr-x. 1 root root 10474 Nov 14 15:14 mysqlbug
-rwxr-xr-x. 1 root root 6758 Nov 14 15:15 mysql_config
drwxr-xr-x. 2 root root 4096 Mar 29 16:40 plugin
The /usr/lib/mysql directory looks like this.
ll /usr/lib/mysql/
total 0
drwxr-xr-x. 2 root root 6 Mar 29 21:36 plugin
On the machine that Bind Compiles on the /usr/lib/mysql folder looks different, and when I do yum whatprovides on the other machine I get this result:
yum whatprovides /usr/lib/mysql/libmysqlclient.so.18.0.0
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.ca.planethoster.net
* extras: centos.mirror.ca.planethoster.net
* updates: mirror.it.ubc.ca
* webtatic: us-east.repo.webtatic.com
1:mariadb-libs-5.5.52-1.el7.i686 : The shared libraries required for MariaDB/MySQL clients
Repo : base
Matched from:
Filename : /usr/lib/mysql/libmysqlclient.so.18.0.0
1:mariadb-libs-5.5.52-1.el7.x86_64 : The shared libraries required for MariaDB/MySQL clients
Repo : #base
Matched from:
Filename : /usr/lib/mysql/libmysqlclient.so.18.0.0
On the fresh install I have installed these mariadb packages.
yum list mariadb*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.its.sfu.ca
* extras: centos.bhs.mirrors.ovh.net
* updates: mirror.its.sfu.ca
Installed Packages
mariadb.x86_64 1:5.5.52-1.el7 #base
mariadb-bench.x86_64 1:5.5.52-1.el7 #base
mariadb-devel.x86_64 1:5.5.52-1.el7 #base
mariadb-embedded.x86_64 1:5.5.52-1.el7 #base
mariadb-embedded-devel.x86_64 1:5.5.52-1.el7 #base
mariadb-libs.x86_64 1:5.5.52-1.el7 #base
mariadb-server.x86_64 1:5.5.52-1.el7 #base
mariadb-test.x86_64 1:5.5.52-1.el7 #base
Available Packages
Please help me figure out how to install Bind with DLZ support on CentOS 7!
Add 'LDFLAGS="-I/usr/include/mysql -L/usr/lib64/mysql"'
on to the ./configure command
like so
./configure --prefix=/usr --sysconfdir=/etc/bind --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-largefile --with-libtool --enable-shared --enable-static --with-openssl=/usr --with-gssapi=/usr --with-gnu-ld --with-dlz-postgres=no --with-dlz-mysql=yes --with-dlz-bdb=no --with-dlz-filesystem=yes --with-dlz-stub=yes --enable-ipv6 LDFLAGS="-I/usr/include/mysql -L/usr/lib64/mysql"

rpm: /usr/bin/rpmsign: Permiso denegado

Hello need help with this error:
[root#localhost ~]# rpm --addsign php-composer-ca-bundle-1.0.2-1.fc22.remi.noarc
rpm: /usr/bin/rpmsign: No existe el fichero o el directorio
[root#localhost ~]# mkdir /usr/bin/rpmsign
rpm: /usr/bin/rpmsign: Permiso denegado
System is Fedora 22
no internet conection to solve via yum install
You are getting an error message which says that the file /usr/bin/rpmsign doesn't exist:
rpm: /usr/bin/rpmsign: No existe el fichero o el directorio
(In English, that would be rpm: /usr/bin/rpmsign: No such file or directory.)
You respond to that by just creating the missing thing as a directory with mkdir:
[root#localhost ~]# mkdir /usr/bin/rpmsign
I guess that follows a certain logic, but the thing is, that can't be just any file. RPM is looking for the actual rpmsign executable. You get the error Permiso denegado (permission denied) when RPM tries to execute that directory. (I'm assuming there's a missing line in your question, where you try to run rpm --addsign again`.)
So, what you need to do is first rmdir /usr/bin/rpmsign, because the directory you created will get in the way of installing the actual RPM. It happens that this is provided by the rpm-sign package. You can find that by running dnf whatprovides /usr/bin/rpmsign — or, you can actually just straight-up tell DNF (or Yum; doesn't matter) to install it:
$ sudo dnf install /usr/bin/rpmsign
Last metadata expiration check: 2:45:11 ago on Wed May 4 08:23:32 2016.
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rpm-sign x86_64 4.13.0-0.rc1.13.fc23 updates 55 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 55 k
Installed size: 17 k
Is this ok [y/N]: y
Downloading Packages:
rpm-sign-4.13.0-0.rc1.13.fc23.x86_64.rpm 140 kB/s | 55 kB 00:00
--------------------------------------------------------------------------------
Total 44 kB/s | 55 kB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Installing : rpm-sign-4.13.0-0.rc1.13.fc23.x86_64 1/1
Verifying : rpm-sign-4.13.0-0.rc1.13.fc23.x86_64 1/1
Installed:
rpm-sign.x86_64 4.13.0-0.rc1.13.fc23
Complete!

Can't install MySQL 5.6 by RPM

I'm trying to install MySQL 5.6 community edition from the RPM package I downloaded. I'm running on cloudera's CDH 4.5 virtual machine, which is CentOS 6.4. The VM came with MySQL 5.1.73 installed, the old versions of files seem to be blocking me from updating.
I already did this:
sudo yum remove mysql
and that worked just fine, without a problem. Then I deleted everything in /usr/lib/mysql, aka the data directory. So then I tried installing the new version:
[cloudera#localhost mysql]$ pwd
/home/cloudera/mysql
[cloudera#localhost mysql]$ ll
total 302660
-rw-r--r-- 1 cloudera cloudera 23080383 Mar 17 02:39 MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 4573735 Mar 17 02:40 MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 114192347 Mar 17 02:40 MySQL-embedded-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 86961692 Mar 17 02:41 MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 2398671 Mar 17 02:41 MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 5180653 Mar 17 02:41 MySQL-shared-compat-5.6.17-1.linux_glibc2.5.x86_64.rpm
-rw-r--r-- 1 cloudera cloudera 73530987 Mar 17 02:42 MySQL-test-5.6.17-1.linux_glibc2.5.x86_64.rpm
[cloudera#localhost mysql]$ sudo yum install MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
.....
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/share/mysql/charsets/README from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
file /usr/share/mysql/czech/errmsg.sys from install of MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 conflicts with file from package mysql-libs-5.1.73-3.el6_5.x86_64
......
So it looks like the old installation is blocking me, I tried to delete mysql-libs but...
[cloudera#localhost mysql]$ sudo yum remove mysql-libs
.....
pig noarch 0.11.0+33-1.cdh4.4.0.p0.14.el6 #cloudera-cdh4 120 M
postfix x86_64 2:2.6.6-2.2.el6_1 #anaconda-CentOS-201112091719.x86_64/6.2 9.7 M
redhat-lsb x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-compat x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-core x86_64 4.0-7.el6.centos #base 22 k
redhat-lsb-graphics x86_64 4.0-7.el6.centos #base 0.0
redhat-lsb-printing x86_64 4.0-7.el6.centos #base 0.0
solr noarch 4.4.0+69-1.cdh4.3.0.p0.4.el6 #cloudera-search 66 M
solr-mapreduce noarch 1.0.0-1.cdh4.3.0.p0.5.el6 #cloudera-search 55 M
sqoop noarch 1.4.3+62-1.cdh4.4.0.p0.15.el6 #cloudera-cdh4 7.7 M
sqoop2 noarch 1.99.2+85-1.cdh4.4.0.p0.62.el6 #cloudera-cdh4 7.8 M
sysstat x86_64 9.0.4-20.el6 #base 807 k
tomcat noarch 7.0.33-3.el6 #epel 303 k
Transaction Summary
=============================================================================================================================================================================================
Remove 67 Package(s)
It went and listed a lot of major software that depends on mysql-libs. I don't want to reinstall tomcat, pig, hive, mahout, hue, oozie, flume, and cloudera manager. I have worked with those before, I know that they are a NIGHTMARE to get installed and configured correctly, so I really don't want to uninstall those.
So I thought maybe I should try an update instead,
[cloudera#localhost mysql]$ sudo yum update MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
....
Examining MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm: MySQL-server-5.6.17-1.linux_glibc2.5.x86_64
Package MySQL-server not installed, cannot update it. Run yum install to install it instead.
No Packages marked for Update
It will not let me update it because I already removed it.
Would somebody please tell me how to install MySQL from these RPMs without uninstalling everything else?
Try to install shared-compat packages as you can see here.
I'm just going to re-write the answer for anybody else who comes across this.
Download the mysql yum repo if you don't already have it: http://dev.mysql.com/downloads/file.php?id=450542
If you have an old version of mysql installed, just do a yum update mysql. You may also need to do yum update mysql-server.
If you uninstalled it, try to reinstall now that you have the new yum repo. If it still fails due to a Transaction check error, try deleting any files that it lists in conflict. Be careful not to delete any files you want to keep.
you may also need to do 'sudo yum update mysql-server' or 'sudo yum install mysql-server'. I did.
I will mark acfrai's answer correct to give him credit, he helped lead me to this information.