How install Intl, GMP and BCMath PHP extensions? - gmp

Centos 6.8 Final
Php 7.0.16
Directadmin control panel
yum install php-gmp
yum install php-bcmath
yum install php-intl
result is: No package xxx available.
Thank you.

BCmath is already preinstalled with PHP. http://php.net/manual/en/bc.requirements.php
For other libs try to define repository where yum would search artifacts and then install the extension. For example,
yum --enablerepo=remi install php-intl
Another alter way is described there https://webtatic.com/packages/php70/
Take a look at the php70w-common package which includes gmp, and further just install php70w-bcmath and php70w-intl. Don't forget to enable all packages inside php.ini.

Related

Yum install package and all its dependencies from local directory

I have downloaded a package and all of its dependencies using yum's download only option into a local directory. I want to then install the package and its dependencies from that directory by passing yum the name of the rpm that contains the primary package in a manner similar to how pip lets you install wheel packages from local directories (provided the wheel files for the dependencies are also present). I DO NOT want yum to try and download the dependencies from a remote repo.
Basically I want this only for yum:
pip install --no-index --find-link=/directory-with-wheel-files primary_package.whl
I have used these links to try and solve my problem:
How to make rpm auto install dependencies
https://unix.stackexchange.com/questions/281715/how-can-i-install-a-local-rpm-using-only-the-local-dependency-rpm-files?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
https://wiki.centos.org/HowTos/CreateLocalRepos
https://www.ostechnix.com/install-packages-specific-repository-linux/
My repo file looks like this:
[basemap]
name=Basemap
baseurl=file:///var/tmp/install/basemap
enabled=1
gpgcheck=0
and my folder /var/tmp/install/basemap has been turned into a repo using yum's createrepo. Yet when I run yum --enablerepo=basemap install primary_package.rpm yum still tries to download the dependencies from the internet. How do I force it to look in my local repo for the dependencies?
Figured it out. I had one option missing from my yum command. I had to disable other repos and then enable only my repo. This command worked:
yum --disablerepo='*' --enablerepo=myrepo install primary_package.rpm

Yum install graphicsmagick on rhel server

Any idea how do i install graphicsmagick using yum on rhel 6?
I know the other method of installing i.e by downloading tar file and running make install and so on. However i was wondering if we can install it through package manager like yum, so that it will be easier to un-install if required in future.
Thanks
You need to install the epel repository in order to do this.
Download the latest epel-release rpm from
http://dl.fedoraproject.org/pub/epel/6/x86_64/
Install epel-release rpm:
rpm -Uvh epel-release*rpm
Install GraphicsMagick rpm package:
yum install GraphicsMagick

how install pdo-mysql in centos7

I install laravel 5 and then install packages neede.
I install php-pdo and some other but now i cant install pdo-mysql and laravel return error.
PDOException in PDOConnection.php line 47: could not find driver
I am use Centos 7 and PHP 5-6-29.
Check which package is installed (which provider) and provides the stack, then use the same namespace.
Webtatic uses php56w-*
IUS uses php56u-*
remi-safe (SCL packages) use php56-php-*
remi-php56 simply use php-*
other providers can use something else
As you need pdo_mysql driver, simply
yum install <namespace>-pdo_mysql
(using the ext name, yum will find the correct package name which provides this ext).
Also check you don't have any "exclude" lines in the yum configuration (such as the ones provided in altered cpanel distributions)
Try using this
yum install php-mysql
systemctl restart httpd
You can search package like
yum search php
Pick the ones you need and install them like this:
yum -y install php-mysqlnd php-pdo
In the next step I will install some common PHP modules that are required by CMS Systems like Wordpress, Joomla, and Drupal:
yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel
https://webtatic.com/packages/php56/
I believe the driver is php56w-mysql so yum install php56w-mysql should do the job.

Not able to install mod_perl module on the server

In my site I am getting an error : an error occurred while processing this directive
It was working fine before moving to the new server. So when I checked I found that mod_perl module is missing. So I tried to install it by downloading the module to the server and then tried to run using Perl Makefile.pl but it was asking for apache src and I was not able to find it. I can see /usr/bin/apache/ folder but no source file inside the folder.
So I tried to install the module from Cpanel but I got the following error:
The C compiler is not functional and auto repair failed. Perl module installs require a working C compiler. Please repair the C compiler and try again.
Please let me know how to install it as I have tried most of the cases searching the net.
Thanks in advance
It's probably best to use your distro's packaging system to install mod_perl, especially, if apache is installed from a package too.
Yum based systems:
yum install mod_perl
Deb based systems
apt-get install mod_perl
you may need to enable the module using a2enmod
Mostly gcc is either corrupted or not present on your system. Please try to re/install gcc on your system
sudo apt-get update
sudo apt-get install build-essential
On Redhat:
yum update
yum install devtoolset-2-toolchain
It seems like a problem with your installation of gcc. You're using CloudLinux, so you should use yum to reinstall gcc.
$ sudo -i yum install gcc
But you don't need gcc if you install the pre-build packages.
$ sudo -i yum install mod_perl
Either way, you're going to need to get to grips with package installation for your system - and for that you're going to need root access.

Ambari repository on CentOS 7

We are trying to install Ambari server following the manual Install Ambari 2.2.1 from Public Repositories.
When we tried to install the Ambari server with the command yum install ambari-server it returns that it is nothing to do.
The ambari.repo is:
#VERSION_NUMBER=2.2.1.0-161
[Updates-ambari-2.2.1.0]
name=ambari-2.2.1.0 - Updates
baseurl=http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.1.0
gpgcheck=1
gpgkey=http://public-repo-1.hortonworks.com/ambari/centos7/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1
Someone can help us?
The problem was that the OS installed was of 32 bits and it is obligatory install the 64 bits OS.
Just clear the yum cache and then try again it will be solved your problem.
yum clean all
yum install ambari-server
Note: Make sure you kept the ambari.repo file in /etc/yum.repos.d/ location
This happens in case:
Package (ambari-server) is already installed
Repolist can't find the package (ambari-server).
First run yum list all if it's not listing package then run
yum clean all
Again run yum list all
If it's not listing your package you need to add .repo file for the same in /etc/yum.repos.d