trouble installing phpmyadmin in amazon linux AMI - linux

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.

Related

Unable to install libsasl2-devel on Amazon Linux 2 machine

I am running Ansible playbook and trying to install OS dependencies packages for python. I am trying to run the following:
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
However, it fails at installing libsasl2-devel with the message:
"No package matching 'libsasl2-devel' found available, installed or updated"
All my instances are Amazon Linux 2 machines. Is there any alternative package for this? I tried to look into this but I found solutions for Ubuntu only.
I was able to get it to work in a series of steps. Its a yum issue after other databases are installed and not cleaned up before installing mysql
clear sasl first: sudo yum remove cyrus-sasl
if you have installed maria, there will be conflicts, remove that as well
sudo yum remove mariadb mariadb-server mariadb-libs
take note of anything uninstalled by this to re-add later. If this is too much, you can take a risk and not remove sasl, but it might not reset the availability of the package.
Start here to clean up the dependency issues: https://serverfault.com/questions/873955/how-solve-mysql-5-7-dependency follow the command given by clean all as sudo rm -rf /var/cache/yum/*
This can possibly resolve your issues right there, if not continue the installation below.
delete all data left in /var/lib/mysql/ or you may have upgrade issues.
resinstall sasl:
sudo yum install cyrus-sasl cyrus-sasl-devel and any other packages removed above.
Establish mysql5.7 with the yum services.
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
sudo yum localinstall -y mysql57-community-release-el6-11.noarch.rpm
sudo yum repolist enabled | grep "mysql.*-community.*"
sudo yum repolist enabled | grep mysql
sudo yum install -y mysql-community-common mysql-community-libs mysql-community-server mysql-community-client
if that doesn't work, re-clear the yum cache again and re-run sudo yum install -y mysql-community-server
if that works, then
sudo service mysqld start
IF the /var/lib/mysql is empty, it will have created a temporary password in the /var/log/mysqld.log (use sudo to read)
run sudo mysql_secure_installation and establish your real password and security settings.
now you should have access via mysql -u root -p

NGINX is giving error when i try to install

I am trying to install nginx in
Amazon Linux AMI
but when i try to run command
sudo yum install nginx
error is below
Loaded plugins: langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.14.0-1.el6.ngx will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: nginx-1.14.0-1.el6.ngx.x86_64
--> Finished Dependency Resolution
Error: Package: nginx-1.14.0-1.el6.ngx.x86_64 (nginx)
Requires: libpcre.so.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I had this exact same problem. Check if you have a file like /etc/yum.repos.d/nginx.repo.
The Nginx install instructions tell us to create such a file and that it should look like this:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1
Those instructions also tell us
Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either 5 (for 5.x) or 6 (for 6.x), depending upon your OS version.
So you need to replace $releasever with the appropriate version of your OS. But when using Amazon Linux AMI (or, in my case, the Azure version), it's not easy to tell what this is.
I found that sudo yum install nginx only worked when I replaced $releasever with 7. When I used 6 instead, I got the exact error as you. Hope this helps!
First run $ sudo yum update -y and after that try to install, if still facing same issue then try with $ sudo yum install nginx --skip-broken

Install gitlab-ce on ubuntu server 17.04

I'm trying to install the gitlab-ce package on a system running Ubuntu server 17.04. I followed the official installation instructions here.
First I ran:
sudo apt-get install curl openssh-server ca-certificates postfix
I already had all of those installed. Then I ran:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Which also worked fine. But when I try to run
sudo apt-get install gitlab-ce
I get the following error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gitlab-ce
I know it's possible to install gitlab on Ubuntu server 17.04, since I had already done It on a previous installation. Unfortunately I installed the OS again from scratch and I can't remember how I had installed gitlab.
Thanks for any help in advance!
I gave up with the "full" automated script, as it doesn't appear to be working with 17.04... Anyway. I grabbed the latest package from https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb
curl -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_9.3.0-ce.0_amd64.deb/download
Installed it with the package manager
sudo dpkg -i gitlab-ce_9.3.0-ce.0_amd64.deb
Then configured it with
sudo gitlab-ctl reconfigure
Then, point your web browser at your new gitlab install and you should be good to go...
Ubuntu 20.04.1
Incase anyone bumps back into this, while trying to gitlab on version 20.0.4 of ubuntu, life is much easier... and the instructions and automated script actually work. GitLab-CE installation instructions
on a fresh install of ubuntu: -
sudo apt install curl
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab- ce/script.deb.sh | sudo bash
sudo apt install gitlab-ce
done!
I was facing the same problem (Lubuntu 17.10), after searching the gitlab forums for 2 Hours, I found this thread.
So from what I have read: Gitlab-ce is not supported for zesty yet. Also the simple
sudo apt-get install gitlab
is a wrong prompt cause it installs a Ubuntu package created by a user named as "praveen" and It is not officially supported by Gitlab.
here is what I did To solve my problem:
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list.save
sudo nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list
replace "zesty" with "xenial" (These files are root access only)
sudo apt update
sudo apt-get install gitlab-ce
This worked for me.
I have spent my whole afternoon for solving this problem, I hope this solution works for you too.
Prost !
EDIT: corrected spelling
I had the same problem getting the install to run on 17.10. According to an issue on their site ( https://gitlab.com/gitlab-org/gitlab-runner/issues/2851 ), the artful packages are not being built.
I did the same this as #DevX, but just changed the parameters on their setup script.
Howler#GitLab:/tmp$ curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
Howler#GitLab:/tmp$ sudo os=ubuntu dist=xenial bash ./script.deb.sh
Howler#GitLab:/tmp$ sudo apt-get install gitlab-ce

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.

Configure unable to find libgcrypt

hello i have faced problem with libgcrypt and i am sure is is installed with newst version thats happen when i try to install libssh2
[root#loft1034 libssh2-1.1]#./configure
configure: error: cannot find OpenSSL or Libgcrypt,
try --with-libssl-prefix=PATH or --with-libgcrypt-prefix=PATH
[root#loft1034 libssh2-1.1]# locate libgcrypt
/usr/lib/.libgcrypt.so.11.hmac
/usr/lib/libgcrypt.so.11
/usr/lib/libgcrypt.so.11.5.2
/usr/lib64/.libgcrypt.so.11.hmac
/usr/lib64/libgcrypt.so.11
/usr/lib64/libgcrypt.so.11.5.2
[root#loft1034 libssh2-1.1]#
i try to using prefix path with no benefit please help me?
Install the package with the header files.
CentOS 6/7, perhaps Fedora:
sudo yum install -y libgcrypt-devel
Debian/Ubuntu:
sudo apt-get install -y libgcrypt11-dev
Try this (it works for Ubuntu 15.10 64 bit)
wget ftp://ftp.debian.org/debian/pool/main/libg/libgcrypt11/libgcrypt11_1.5.0-5+deb7u3_amd64.deb
sudo dpkg -i libgcrypt11_1.5.0-5+deb7u3_amd64.deb
If you are using centOS install libcrypt-devel:
sudo yum install libgcrypt-devel
For ubuntu(works for me)
Try to download the package first, download links, note choose the right architecture.
there take amd64 as an example.first we get the link address http://security.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
On ubuntu, we download the package
wget http://security.ubuntu.com/ubuntu/pool/main/libg/libgcrypt20/libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
then install it
sudo dpkg -i libgcrypt11-dev_1.5.4-3+really1.8.1-4ubuntu1.3_amd64.deb
Maybe there are other dependencies need to install.
you can choose to install it one by one, or follow the tips
sudo apt --fix-broken install

Resources