I am trying to install pecl_http on Ubuntu 14.04, however it reports to require PHP 7.
$ sudo pecl install pecl_http
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.5.9-1ubuntu4.14
No valid packages found
install failed
$
Similarly on Debian:
pecl/pecl_http requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/raphf requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
pecl/propro requires PHP (version >= 7.0.0), installed version is 5.6.17-0+deb8u1
I can't find changelog any information that pecl_http is not backward compatible with PHP 5.x.
I tried with PHP 7.0 and it installed successfully, but is there anything I can do to install it with PHP 5.x?
You'll need to find out what version of pecl_http doesn't require the current version of PHP, and then specifically install that one. According to the documentation:
"Package[-version/state][.tar]" : queries your default channel's server
(pear.php.net) and downloads the newest package with
the preferred quality/state (stable).
To retrieve Package version 1.1, use "Package-1.1," to retrieve
Package state beta, use "Package-beta." To retrieve an uncompressed
file, append .tar (make sure there is no file by the same name first)
And according to the changelog, pecl_http 3.0 is the first PHP 7 compatible version, so maybe try the previous.
Final answer: you'd be looking for sudo pecl install pecl_http-2.5.5
This question has an accepted answer, but I will add my 2 cents to the subject:
Based on your PHP version:
for PHP 7 use 'pecl install oci8'
for PHP 5.2 to 5.6 use 'pecl install oci8-2.0.12'
for PHP 4.3.9 to 5.1 use 'pecl install oci8-1.4.10'
OCI8 2.0.12 is the final release for PHP 5.6.x
OCI8 2.1.x is only valid for PHP 7
Installing OCI8 for PHP 5.6.31:
[root#server bin]# ./pecl install oci8-2.0.12
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading oci8-2.0.12.tar ...
Starting to download oci8-2.0.12.tar (1,615,360 bytes)
....
11 source files, building
running: phpize
Configuring for:
...
Expected output for PHP 5.6.31 and OCI8 2.0.12
This is the easiest way to install OCI8 support.
Related
I'm trying to install the latest version of PHP on my Mac. I tried this
brew install php72 --force
and then wanted to check the version, but got this error
localhost:regagents davea$ php --version
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
Referenced from: /usr/local/Cellar/php72/7.2.1_12/bin/php
Reason: image not found
Abort trap: 6
so I figured I could re-install readline, so I think I did ...
localhost:regagents davea$ brew reinstall readline
==> Reinstalling readline
==> Downloading https://homebrew.bintray.com/bottles/readline-8.0.0.high_sierra.bottle.tar.gz
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/c0566e677ba9f92c270590e2d8132f95668817a7817d2ee47711ff3c2ff045d6--readline-8.0.0.high_sierra.bottle.tar.gz
==> Pouring readline-8.0.0.high_sierra.bottle.tar.gz
==> Caveats
readline is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only.
For compilers to find readline you may need to set:
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"
For pkg-config to find readline you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/readline/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/readline/8.0.0: 48 files, 1.5MB
but then running "php -version" gives me the same error. What gives? How do I install and run php on my Mac?
Your older version of php is linked against readline 7. You have readline 8. Update php: the latest version of the php72 package in homebrew is 7.2.17_1.
brew update
brew upgrade php72
php 7.3.4 is available from the php package. To install the latest version of php:
brew install php
a try install svn for php 7.1 with pecl:
pecl install svn
and i habe error:
pecl/svn requires PHP (version >= 4.0.0, version <= 6.0.0), installed version is 7.1.7
No valid packages found
install failed
What is wrong?
Thanks.
According to the error , you need a version less than or equal to php6.0 for the svn package that you are trying to install.
You can try installing a different php version thats suitable for the package or find a working package modified for php 7.1
Look at the official documentation here :
https://pecl.php.net/package/svn
The dependency is clearly stated to be php 6.0 or older
The current stable released version of PECL svn doesn't work with PHP 7. There is an open bug report current with a patch submitted to it here https://bugs.php.net/bug.php?id=75206
The patch worked for me with PHP 7.1 but it's not been officially vetted and released by the maintainers of PECL svn as of yet.
I've been trying to get MCRYPT to install for the past hour - To no avail
Reply :
php5-mcrypt: Depends: phpapi-20090626
Php version :PHP Version 5.4.6-2~lucid+1
Ubuntu 10.04
NGINX web server
Seems like there are two things that made me unable to install MCRYPT
1) no support for this version of php
2) MYCRYPT has a conflict with SlimFramework , which I use
I need to install propel_generator version 1.3.5 on my machine. I tried to install it using PEAR via:
pear install propel/propel_generator-1.3.5
but it failed with the following message:
Failed to download propel/propel_generator, version "1.3.5", latest release is version 1.6.7, stability "stable", use "channel://pear.propelorm.org/propel_generator-1.6.7" to install
install failed
Following this answer I checked http://pear.propelorm.org/Chiara_PEAR_Server_REST/r/propel_generator/allreleases.xml and the earliest version of propel_generator that is available for install via PEAR from there is version 1.3.0 and the next to follow is 1.4.0 with no 1.3.5 in between.
Is there a way to install propel_generator version 1.3.5 using PEAR or any other way?
I can't even find the source code for the 1.3.5 generator.
PS: The generator is being used by a legacy system so upgrading isn't really an option.
There was never an official release of 1.3.5, see the list of tags at http://svn.propelorm.org/tags/ - you won't get that version from anywhere.
I have a problem with the update on php 5.4.9 (i install it with the ppa "ppa:ondrej/php5")
Now i have the problem that i can't install libssh2-php (which is required on my project)
I found some .deb files, but it's only for 32-bit systems.
So when i'm trying to install libssh2-php i have a collision with "libssh2-php:i386" and i have the following dependiesmessage:
ucf:i386 libc6:i386 (>= 2.4) libssh2-1:i386 (>= 1.0) and phpapi-20090626+lfs:i386
System: Ubuntu Server 12.04 LTS x64 | PHP 5.4.9
I also got a warning on running "php -v"
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/ssh2.so' - /usr/lib/php5/20100525/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0
The problem is/was that the libssh2 is not aviable for PHP5.4.x AND a x64 system.
I have the same problem trying to use ondrej's ppa for ubuntu 10.04 LTS. It seams that he didn't include the sssh extension.
Apt-get tries to install the version from default package which runs into conflict (depends phpapi-20090626+lfs) with current installed version, isn't it?
Only my backup php cli script needs this extension to run. After trying to solve dependencies witout success, I switched to a shell_exec('ssh ...#...') solution as workaround.
I am only a developer with advanced admin knowledge, no apt-get or linux packaging admin professional. There maybe other solution to fix this via packaging management or maybe building the needed version from source?
EDIT:
There will be another nicer solution :-) you can use pecl to install / build the extension, here is what i have done:
$ sudo pecl install ssh2
Failed to download pecl/ssh2 within preferred state "stable", latest release is version 0.12, stability "beta", use "channel://pecl.php.net/ssh2-0.12" to install
install failed
$ sudo pecl install channel://pecl.php.net/ssh2-0.12
downloading ssh2-0.12.tgz ...
Starting to download ssh2-0.12.tgz (26,223 bytes)
[...]
Build process completed successfully
Installing '/usr/lib/php5/20100525+lfs/ssh2.so'
install ok: channel://pecl.php.net/ssh2-0.12
configuration option "php_ini" is not set to php.ini location
You should add "extension=ssh2.so" to php.ini
Afterwards I add extension=/usr/lib/php5/20100525+lfs/ssh2.so to php config.
Just do:
sudo aptitude purge php5-suhosin
It's described in detail here: bugs.debian.org