SOLVED grpc not showing up in PECL/PEAR for centos7 and WHM

oah

Well-Known Member
Jan 23, 2018
66
10
58
Iraq
cPanel Access Level
Website Owner
Hi
I am trying to install GRPC extension for PHP and it is not showing any where not in PECL, EA4, PEAR, although the google documentation states you can install it via PEAR on centos7. as shown below:

https://cloud.google.com/php/grpc#centos-rhel-7

1658282495495.png

I can try and install it from the command line but I am afraid it might break my php or something else. The question is if it is available as a PEAR module, what it is not showing up when I search for it via WHM's pear (install module) and is it safe to just install it from the command line?

Thx.
 
Last edited by a moderator:

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
Can you try to install it this way? It should be relatively safe:

/opt/cpanel/ea-php##/root/usr/bin/pecl install grpc-1.33.1

Replace "##" with the PHP version i.e 70, 71, 72, 73, 80 etc...

If this doesn't work give this a try without specifying the version.
 
  • Like
Reactions: oah and cPRex

oah

Well-Known Member
Jan 23, 2018
66
10
58
Iraq
cPanel Access Level
Website Owner
Can you try to install it this way? It should be relatively safe:

/opt/cpanel/ea-php##/root/usr/bin/pecl install grpc-1.33.1

Replace "##" with the PHP version i.e 70, 71, 72, 73, 80 etc...

If this doesn't work give this a try without specifying the version.
Thx a ton
It worked like a charm

1658363667946.png
 

oah

Well-Known Member
Jan 23, 2018
66
10
58
Iraq
cPanel Access Level
Website Owner
@andrew.n 's command worked well for me with PHP 7.4 on a CentOS 7 machine. Let us know if you still have issues after trying that!
worked like charm. thx again.
The funny thing is, I have no idea on how to mark the question as solved. Can I do it or is that an admin thing?
 

keanallen

Registered
Nov 27, 2022
2
0
1
Philippines
cPanel Access Level
Root Administrator
@keanallen - have you tried using the WHM >> Module Installer >> PECL option to install grpc? It takes a while to run, but I just tested that and confirmed that does work.
It is working if I install grpc on ea-php74. But I want it to install on ea-php81 because PHP7.4 has no longer support. And our laravel app requires at least php 8.1

The error when installing grpc on ea-php81 is:




1669771410700.png