I recently trying out AWS EC2 and launched an instance. I have just installed php successfully via sudo yum install php php-mysql
But when I try sudo yum install mysql-server, it says
$ sudo yum install mysql-server
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core >| 2.4 kB 00:00:00
No package mysql-server available.
Error: Nothing to do
May I know how can I get it to install SQL server? Any help is much appreciated, thank you!
Run below resolved for me
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
rpm -ivh https://repo.mysql.com//mysql57-community-release-el6-11.noarch.rpm
yum install mysql-server
https://www.techietown.info/2017/07/error-no-package-mysql-server-available-while-installing-mysql-server/
Check out this tutorial >> https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
I think the package name might be incorrect as the one in the tutorial is mysql56-server. You could also do a yum search mysql as suggested above to find the appropriate package.
I am new to CentOS and I am trying to install composer through the terminal. Unforently it keeps saying file not found.
My terminal command as root:
curl -sS https://getcomposer.org/install | php
and the output error is
bash: php: command not found
curl: (23) Failed writing body ( 0 !=7626)
have things changed with composer and the install process for centos or am I missing something?
You need to install PHP first before you can install composer.
Installing PHP with yum package management:
yum install php
You need to install PHP first on centos then you will be able to run your command
First, install php & php-cli
yum install php
yum install php-cli
and then run composer install
Read this article too
I'm trying to install sqlsrv by using the commands from this page. However, when running
pecl install sqlsrv-4.2.0preview
I get the error: Error 1 ERROR: 'make' failed.
I tried :
apt-get update
apt-get install build-essential
apt-get install libpcre3-dev
apt-get install make
All of these are installed on the latest version.
I'm running a container using the php:7.0-apache image. Running apachectl -V returns Apache/2.4.10 (Debian).
Here is the full log output from the command I ran: https://pastebin.com/MYDY3xwU
I had this exact error.
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:17: fatal error: sql.h: No such file or directory
#include <sql.h>
Apparently the header file its looking for is only in the package unixODBC-devel.
I installed that package and was able to successfully complete the build. yum install unixODBC-devel.
Possibly, a better explanation is here.
stackoverflow Question # 15447386
I had the following error on Ubuntu 18.04 when installing
/tmp/pear/temp/sqlsrv/shared/xplat.h:30:10: fatal error: sql.h: No such file or directory #include <sql.h>
Installing the package unixodbc-dev as Matthew Goheen proposed solved the issue
sudo apt-get install unixodbc-dev
try
sudo apt-get install unixodbc-dev
Since my upgrade from PHP 5.5.9 to 5.6 on my Ubuntu 14.04 LTS server I have been getting problems with the expect library for PHP. It keeps displaying the Fatal error in the description. I believe the package that I need for this is libexpect-php5. Some installation checks confirm that it is installed:
root#k1:/etc/php5/conf.d$ dpkg --get-selections | grep -v deinstall | grep expect
empty-expect install
expect install
expect-dev install
expect-lite install
libexpect-ocaml install
libexpect-ocaml-dev install
libexpect-perl install
**libexpect-php5** install // installed right?
libexpect-simple-perl install
libghc-hspec-expectations-dev install
libghc-hspec-expectations-doc install
libghc-hspec-expectations-prof install
libnet-scp-expect-perl install
libtest-expect-perl install
netexpect install
python-pexpect install
python-pexpect-doc install
python3-pexpect install
and
root#k1:/etc/php5/conf.d$ expect -v
expect version 5.45
and the expect.so files:
root#k1:/usr/lib$ ls | grep expect
libexpect.so
libexpect.so.5
libexpect.so.5.45
and finally my /etc/php5/apache2/php.ini file:
extension=expect.so
I had to install libexpect-ph5 by downloading and installing the .deb file manually, because it was erring about an uninstallable dependency api... Now when I do and apt-get update && apt-get upgrade it keeps telling me this:
The following packages have been kept back:
libexpect-php5
Just installing that package does something, but the system will still keep the package back. This leaves me with a PHP version that doesn't know about the expect_popen() function.
How do I solve this?
I found out that Apache2 was loading the wrong php.ini file. Since the upgrade to PHP 5.6 the path has changed as well (of course).
Old location:
/etc/php/apache2/php.ini
New location:
/etc/php/5.6/apache2/php.ini
Along with that I had to specify the exact path to my expect.so extension in php.ini.
I'm trying to install Facebook PHP SDK with Composer. This is what I get
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for facebook/php-sdk dev-master -> satisfiable by facebook/php-sdk[dev-master].
- facebook/php-sdk dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem is, I have curl extension enabled (uncommented in php.ini). When I run phpinfo(), it says it's enabled.
Only clue I have is that when I run $ php -m, 'curl' line is missing but I don't know what to do about it.
I have wamp 2.4 on Win8 and I'm running composer in cmd.exe.
This is caused because you don't have a library php5-curl installed in your system,
On Ubuntu its just simple run the line code below, in your case on Xamp take a look in Xamp documentation
sudo apt-get install php5-curl
For anyone who uses php7.0
sudo apt-get install php7.0-curl
For those who uses php7.1
sudo apt-get install php7.1-curl
For those who use php7.2
sudo apt-get install php7.2-curl
For those who use php7.3
sudo apt-get install php7.3-curl
For those who use php7.4
sudo apt-get install php7.4-curl
For those who use php8.0
sudo apt-get install php8.0-curl
Or simply run below command to install by your version:
sudo apt-get install php-curl
This worked for me: http://ubuntuforums.org/showthread.php?t=1519176
After installing composer using the command curl -sS https://getcomposer.org/installer | php just run a sudo apt-get update then reinstall curl with sudo apt-get install php5-curl. Then composer's installation process should work so you can finally run php composer.phar install to get the dependencies listed in your composer.json file.
on php7 run for example:
> sudo apt-get install php-curl
> sudo apt-get install php-mbstring
for every missing extension. Then:
> sudo apt-get update
and finally (in the project's root folder):
> composer install
As Danack said in comments, there are 2 php.ini files. I uncommented the line with curl extension in the one in Apache folder, which is php.ini used by the web server.
Composer, on the other hand, uses php for console which is a whole different story. Php.ini file for that program is not the one in Apache folder but it's in the PHP folder and I had to uncomment the line in it too. Then I ran the installation again and it was OK.
I ran into the same issue trying to install Dropbox SDK.
CURL was indeed enabled on my system but this meant by the php.ini in the wamp\bin\apache folder.
I simply had to manually edit the php.ini situated in wamp\bin\php, uncomment the extension=php_curl.dll line, restart Wamp and it worked perfectly.
Why there are those 2 php.ini and only one is used is still a mystery for me...
Hope it's helpul to someone!
I had this problem after upgrading to PHP5.6. My answer is very similar to Adriano's, except I had to run:
sudo apt-get install php5.6-curl
Notice the "5.6". Installing php5-curl didn't work for me.
For anyone who encounters this issue on Windows i couldn't find my answer on google at all.
I just tried running composer require ext-curl and this worked.
Alternatively add the following in your composer.json file:
"require": {
"ext-curl": "^7.3"
}
According to https://github.com/composer/composer/issues/2119 you could extend your local composer.json to state that it provides the extension (which it doesn't really do - that's why you shouldn't publicly publish your package, only use it internally).
I ran into a similar issue when trying to get composer to install some dependencies.
It turns out the .dll my version of Wamp came with had a conflict, I am guessing, with 64 bit Windows.
This url has fixed curl dlls: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
Scroll down to the section that says: Fixed Curl Extensions.
I downloaded "php_curl-5.4.3-VC9-x64.zip". I just overwrote the dll inside the wamp/bin/php/php5.4.3/ext directory with the dll that was in the zip file and composer worked again.
I am running 64 bit Windows 8.
Hope this helps.
if use wamp go to:
wamp\bin\php\php.5.x.x\php.ini
find:
;extension=php_curl.dll
remove (;)
Enable in php 7 try below command
sudo apt-get install php7.0-curl
Not sure why an answer with Linux commands would get so many up votes for a Windows related question, but anyway...
If phpinfo() shows Curl as enabled, yet php -m does NOT, it means that you probably have a php-cli.ini too. run php -i and see which ini file loaded. If it's different, diff it and reflect and differences in the CLI ini file. Then you should be good to go.
Btw download and use Git Bash instead of cmd.exe!
I have Archlinux with php 7.2, which has Curl integrated, so no amount of configuration voodoo would make Composer see ext-curl, that PHP could see and work with happily. Work around is to use Composer with --ignore-platform-reqs.
eg composer update --ignore-platform-reqs
Reference = https://github.com/composer/composer/issues/1426
try install php5-curl by using below snippet.
sudo apt-get install php5-curl
if it won't work try below code i m sure it will work fine.
sudo apt-get install php-curl
for me it worked... all the best :)
In my case I moved from PHP5 to PHP7 and I ve got this error,
Simply go to your /bin/php/php7/php.ini , then uncomment extension=php_curl.dll and restart your server, re-run your composer install.
If you getting error like php7.2-curl doesn't have installable candidate or not locate any package or dependencies is php7.2-common Or libcurl3 Do this
You have to tackle in mature way. Install aptitude these ubuntu package manager will finds all dependencies, and will install one by one.
apt-get install aptitude
Now you have to check if aptitude can download it or not if download it follow instructions
sudo aptitude install php7.2-curl
If you have gotten any error like this
E: Unable to locate package php7.2-curl
E: Couldn't find any package by glob 'php7.2-curl'
Any type on error i'm not talking about proper these errors
Try to add php package again
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
Now try this command
sudo aptitude install php7.2-curl
Aptitude will ask you you want to keep current version of all dependencies
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) php7.2-curl [Not Installed]
Accept this solution? [Y/n/q/?]
Type n then Enter
Aptitude will find all dependencies and ask you to install all package type
y
Again
y
Then
systemctl restart apache2
For centos of rhel
systemctl restart httpd
It will Not enabling PHP 7.2 FPM by default.
NOTICE: To enable PHP 7.2 FPM in Apache2 do
a2enmod proxy_fcgi setenvif
a2enconf php7.2-fpm
This method is not only for this error you can find any of php apache2 or ubuntu system package solution using aptitude.
Upvote if you find your solution
If you are ubuntu, this will work for you.
composer update --ignore-platform-reqs