Installing Azure CLI on RHEL 7.6 - azure

Having some issues installing the Azure CLI on a RHEL 7.6 VM in the Azure cloud. Been following this guide:
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest
I perform each step, but get this error:
Error: Package: azure-cli-2.9.1-1.el7.x86_64 (azure-cli)
Requires: python3
Error: Package: azure-cli-2.9.1-1.el7.x86_64 (azure-cli)
Requires: libpython3.6m.so.1.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I then tried installing just about every python3-related package at my disposal (python33.x86_64,
rh-python38.x86_64, etc), but still getting the same error. I then tried the following solution:
$ sudo yum install yum-utils
$ sudo yumdownloader azure-cli
$ sudo rpm -ivh --nodeps azure-cli-2.9.1-1.el7.x86_64.rpm
Commands succeed, but running a simple 'az login' command still fails...
[root#server ~]# rpm -ivh --nodeps azure-cli-2.9.1-1.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:azure-cli-2.9.1-1.el7 ################################# [100%]
[root#server ~]# az login
/bin/az: line 2: /usr/bin/python3: No such file or directory
Any suggestions? Thanks again in advance.

So, I just completely went around the documentation and used a pip install.
# As non-privileged user
sudo yum install rh-python38 -y
scl enable rh-python38 bash
pip3 install --user azure-cli
All 'az' commands work flawlessly. Easy-peasy :-D

Related

Can not install mariadb on amazon linux ARM: packages not found

Working fine on Amazon Linux with Intel arch but not on ARM. I have followed one of the many guides like this one: https://techviewleo.com/how-to-install-mariadb-server-on-amazon-linux/
So executed:
sudo amazon-linux-extras | grep mariadb
got version 10.5, so continued:
sudo yum -y update
sudo reboot
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
sudo bash mariadb_repo_setup --os-type=rhel --os-version=7 --mariadb-server-version=10.5
sudo rm -rf /var/cache/yum
sudo yum makecache
sudo amazon-linux-extras install epel -y
So far so good, now:
yum install MariaDB-server MariaDB-client -y
....
--> Finished Dependency Resolution
Error: MariaDB-common conflicts with MariaDB-server-10.5.17-1.el7.centos.aarch64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
"--skip-broken" argument does not help.
When trying version 10.10:
yum install MariaDB-server MariaDB-client -y
....
https://dlm.mariadb.com/repo/mariadb-server/10.10/yum/rhel/7/aarch64/rpms/galera-4-26.4.12-1.el7a.aarch64.rpm: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=mariadb-main clean metadata
Trying other mirror.
Error downloading packages:
MariaDB-server-10.10.1-1.el7.centos.aarch64: [Errno 256] No more mirrors to try.
galera-4-26.4.12-1.el7a.aarch64: [Errno 256] No more mirrors to try.
MariaDB-client-10.10.1-1.el7.centos.aarch64: [Errno 256] No more mirrors to try.
"yum --enablerepo=mariadb-main clean metadata" does not help.
I've tried all version between 10.5 and 10.10, all failing.
EC2 machine deployed right now (t4g.medium). Did not have any problems on intel arch last week with exactly same code.
What is wrong ?
Thanks,
Centos7 for non-x86_64 platforms is deprecated. Ref: https://mariadb.com/kb/en/deprecation-policy/
The RHEL7 that feeds Centos 7 ended supported for non-86_64 platforms. While Centos7 still claims to be supported for aarch64, they simply don't get bugs fixes (including bugs affecting the MariaDB development that got noticed and reported to RHEL, that got fixed in RHEL8 only) so for all intensive purposed its not maintained.
As such MariaDB is no longer performing releases for Centos/RHEL 7 on non-x86_64 platforms.
ref: MDEV-30636

installing puppeteer 2 elastickbeanstalk

I can't deploy puppeteer on aws AWS Elastic Beanstalk.
I'm getting the following error:
Failed to launch the browser process!\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatk-bridge-2.0.so.0)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatspi.so.0)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: symbol lookup error: /var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: undefined symbol: g_type_class_adjust_private_offset\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md\n"
Did anyone had the same issue and managed to solve it?
finally I solved it with this:
packages:
yum:
compat-libtiff3: []
commands:
chrome:
command: curl https://intoli.com/install-google-chrome.sh | bash
You need to add a number of shared libs, see https://github.com/puppeteer/puppeteer/issues/765#issuecomment-358111805
You will also need 'sudo yum install -y mesa-libgbm.x86_64'
And looks like it works only for puppeteer2.0.0, later version fails with https://github.com/puppeteer/puppeteer/issues/5379
This worked for me !
Connected remotly via SSH in elastic beanstalk
eb ssh {environment_name}
Install Google Chrome
curl https://intoli.com/install-google-chrome.sh | bash
Source :
https://dev.to/achimoraites/a-developers-guide-to-run-puppeteer-on-elastic-beanstalk-no-ubuntu-linux-4pl5
Solved it with the following post-build script after trying a whole bunch of different packages / versions.
Tested on Amazon Linux 2, Node.JS v16, puppeteer v15.3.0
#!/bin/bash
# Put this in your Amazon Elastic Beanstalk repo
# Tested on Amazon Linux 2, Node.JS v16, puppeteer v15.3.0
# File path: .platform/hooks/postdeploy/01_install_libs.sh
sudo amazon-linux-extras install epel -y
cd node_modules/puppeteer/
cd .local-chromium/linux-*/chrome-linux
sudo yum install cups-libs dbus-glib libXrandr libXcursor libXinerama cairo cairo-gobject pango libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libcups2
sudo rpm -ivh --nodeps --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/atk-2.28.1-2.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-atk-2.26.2-1.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-core-2.28.0-1.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/g/GConf2-3.2.6-7.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libXScrnSaver-1.2.2-6.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libxkbcommon-0.3.1-1.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libwayland-client-1.2.0-3.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libwayland-cursor-1.2.0-3.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/g/gtk3-3.10.4-1.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/x86_64/os/Packages/gdk-pixbuf2-2.24.0-1.fc16.x86_64.rpm
sudo yum install -y chromium
Gist: https://gist.github.com/lucashenning/8f6807eab8b5d99caafd2a507f770ba1

Installing Boost in Linux

I recently set up an AWS EC2 Linux instance, and I'm trying to install boost using the following code:
wget -c
http://sourceforge.net/projects/boost/files/boost/1.66.0/boost_1_66_0.tar.bz2
tar jxf boost_1_66_0.tar.bz2
cd boost_1_66_0
sudo ./bootstrap.sh --prefix=/usr/local/
./b2
sudo ./b2 install
When I run this, I get the following:
error: toolset gcc initialization:
error: no command provided, default command 'g++' not found
error: initialized from project-config.jam:12
Also, when I tried installing g++, which I thought I had already done by issuing this:
sudo yum install gcc-c++
The result:
Package gcc-c++-4.8.5-1.22.amzn1.noarch already installed and latest version
Nothing to do
On AWS Linux the way to go is described here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compile-software.html
Or execute command:
sudo yum groupinstall "Development Tools"
This should help.
It seems like you are missing other build tools required for compiling. Installing following should fix your problem,
sudo yum install -y gcc libxml2-devel gcc-c++ make
You can uninstall the tools afterwards.

trouble installing phpmyadmin in amazon linux AMI

I am installing a LAMP enviornment using amazon docs
I enabled epel after that when i try to install phpmyadmin using command
sudo yum install -y phpMyAdmin. It installs something maybe phpmyadmin but in the end it shows some errors like this:
--> Finished Dependency Resolution
Error: php70-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
Error: php56-process conflicts with php-process-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
After that when I run this command
sudo sed -i -e 's/127.0.0.1/your_ip_address/g' /etc/httpd/conf.d/phpMyAdmin.conf
it shows
sed: can't read /etc/httpd/conf.d/phpmyadmin.conf: No such file or directory
what is the solution?
You can try the following to resolve the conflict. Basically we will downgrade to php5. Unless your application specifically needs php7, this should be fine. To this this use.
sudo yum remove httpd24 php70 mysql56-server php70-mysqlnd
Then
sudo yum install httpd24 php56 mysql56-server php56-mysqlnd
For the second error make sure Apache is installed.
sudo yum install httpd
You might have to reinstall phpmyadmin after this so it can the virtual host file phpmyadmin.conf
Hope that helps.

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Resources