Link to home
Start Free TrialLog in
Avatar of Jorge Batres
Jorge BatresFlag for United States of America

asked on

Help building PHP 7.3.0 with WebP support

Hi, I need help building PHP 7.3.0 with gd.so module with WebP support on a Linux server RHEL 7.6. I tried running
yum install make gcc plesk-php73-devel libjpeg-turbo-devel libpng-devel libXpm-devel freetype-devel libwebp-devel

Open in new window

but libwebp-devel is not available from subscription-manager.

Please help!

JB
Avatar of David Favor
David Favor
Flag of United States of America image

Avatar of dfke
dfke

Hi,

xpra has one for redhat 7.6. You can get it here.

Cheers
Where ever you use to download your rpm file... just make sure to first check https://github.com/webmproject/libwebp for latest stable version.

Today shows 1.0.1 so this is the minimal version to install.
Avatar of Jorge Batres

ASKER

Thank you both, so when I download the rpm file, could you please help me with the steps to install it? I have a set of instructions that I can post here, but my distribution didn't include this rpm when I tried this the first time.

On my server I have different PHP versions and handlers. Currently I'm using PHP 7.2.13 for my sites, and I can assign different PHP versions to my sites, so if I work with say PHP 7.3.0 I guess I should be fine. Please let me know if this is correct.

Thanks,

JB
To install...

rpm -i file.rpm

Open in new window


If you're trying to manage multiple versions of PHP, do yourself a favor + run LXD with only one PHP version per container.

Trying to run multiple PHP versions in the same namespace (machine or container) is a nightmare to setup + maintain.

Also if you work with many PHP versions every day, use Ubuntu + the standard stable release PPAs...

apt-get -y install software-properties-common

LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/apache2 </dev/null
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php </dev/null

Open in new window


Using the ondrej PPAs allows installing all stable + usually current dev release all in parallel, then easily switch between them.

This means to switch from PHP-7.2 to PHP-7.3 requires only a few seconds of work.

So if your time is valuable, use LXD + Ubuntu + ondrej PPAs.
David, I think that eventually I will have to start a new server with the configuration you are recommending; however, for now I'm in need of making my current server to work with WebP support. I use Plesk as control panel and I have a set of instructions but I need help putting this together as WebP is not included on the default repository.
Hi, I tried installing the rpm this morning and I got some dependencies errors. Could you please tell me how to proceed from here?

[root@web ~]# rpm -i libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm
warning: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID f18ad6bb: NOKEY
error: Failed dependencies:
	libwebp-xpra = 1.0.0 is needed by libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
	libwebp.so.7()(64bit) is needed by libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
	libwebpdemux.so.2()(64bit) is needed by libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
[root@web ~]# 

Open in new window


Thanks
Hi,

you can let yum install the dependencies for you. All you need to do is make a local repository and you should be set.
Create a directory that you will use as your local repository e.g. /home/user/repository

Set the appropriate rights:

# chown -R root.root /home/user/repository

Open in new window


Next install the createrepo package en after that run:
# createrepo /home/user/repository
# chmod -R o-w+r /home/user/repository

Open in new window



Create the repository configuration file for your new repository e.g. /etc/yum.repos.d/myrepo.repo containing

[local]
name=My magnificent Repo
baseurl=file://home/user/repository
enabled=1
gpgcheck=0

Open in new window

Then install the package with:

# yum install libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm

Open in new window

Thank you dfke, I just wanted to make sure that after creating this local repository yum will continue to work the same way it has before with anything else right?
ASKER CERTIFIED SOLUTION
Avatar of dfke
dfke

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm still having the dependencies problem:

[root@web ~]# yum --nogpgcheck localinstall libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Examining libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
Marking libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libwebp-xpra-devel.x86_64 0:1.0.0-1.el7_6 will be installed
--> Processing Dependency: libwebp-xpra = 1.0.0 for package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
PLESK_17_8_11-extras                                                                                                                                                                                                    | 2.9 kB  00:00:00     
PLESK_17_PHP52                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP53                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP54                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP55                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP56                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP70                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP71                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP72                                                                                                                                                                                                          | 2.9 kB  00:00:00     
PLESK_17_PHP73                                                                                                                                                                                                          | 2.9 kB  00:00:00     
epel/x86_64/metalink                                                                                                                                                                                                    |  14 kB  00:00:00     
epel                                                                                                                                                                                                                    | 4.7 kB  00:00:00     
kernelcare                                                                                                                                                                                                              | 2.6 kB  00:00:00     
mariadb                                                                                                                                                                                                                 | 2.9 kB  00:00:00     
plesk-migrator                                                                                                                                                                                                          | 2.9 kB  00:00:00     
plesk-migrator-tp                                                                                                                                                                                                       | 2.9 kB  00:00:00     
rhel-7-server-rpms                                                                                                                                                                                                      | 2.4 kB  00:00:00     
(1/20): PLESK_17_PHP52/primary_db                                                                                                                                                                                       |  13 kB  00:00:00     
(2/20): PLESK_17_PHP56/primary_db                                                                                                                                                                                       |  14 kB  00:00:00     
(3/20): PLESK_17_PHP70/primary_db                                                                                                                                                                                       |  14 kB  00:00:00     
(4/20): PLESK_17_PHP53/primary_db                                                                                                                                                                                       |  13 kB  00:00:00     
(5/20): PLESK_17_PHP71/primary_db                                                                                                                                                                                       |  14 kB  00:00:00     
(6/20): PLESK_17_8_11-extras/primary_db                                                                                                                                                                                 |  30 kB  00:00:00     
(7/20): PLESK_17_PHP72/primary_db                                                                                                                                                                                       |  14 kB  00:00:00     
(8/20): PLESK_17_PHP73/primary_db                                                                                                                                                                                       |  13 kB  00:00:00     
(9/20): PLESK_17_PHP55/primary_db                                                                                                                                                                                       |  13 kB  00:00:00     
(10/20): PLESK_17_PHP54/primary_db                                                                                                                                                                                      |  13 kB  00:00:00     
(11/20): kernelcare/7Server/x86_64/primary_db                                                                                                                                                                           |  16 kB  00:00:00     
(12/20): epel/x86_64/group_gz                                                                                                                                                                                           |  88 kB  00:00:00     
(13/20): plesk-migrator/primary_db                                                                                                                                                                                      | 6.3 kB  00:00:00     
(14/20): plesk-migrator-tp/primary_db                                                                                                                                                                                   | 1.1 kB  00:00:00     
(15/20): mariadb/primary_db                                                                                                                                                                                             |  50 kB  00:00:00     
(16/20): rhel-7-server-rpms/7Server/x86_64/group                                                                                                                                                                        | 724 kB  00:00:00     
(17/20): epel/x86_64/updateinfo                                                                                                                                                                                         | 950 kB  00:00:00     
(18/20): epel/x86_64/primary_db                                                                                                                                                                                         | 6.5 MB  00:00:01     
(19/20): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                                                   | 6.3 MB  00:00:00     
(20/20): rhel-7-server-rpms/7Server/x86_64/primary                                                                                                                                                                      |  43 MB  00:00:04     
rhel-7-server-rpms                                                                                                                                                                                                                 36665/36665
--> Processing Dependency: libwebp.so.7()(64bit) for package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
--> Processing Dependency: libwebpdemux.so.2()(64bit) for package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64
--> Finished Dependency Resolution
Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebp-xpra = 1.0.0
Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebpdemux.so.2()(64bit)
Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebp.so.7()(64bit)
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebp-xpra = 1.0.0
Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebpdemux.so.2()(64bit)
Error: Package: libwebp-xpra-devel-1.0.0-1.el7_6.x86_64 (/libwebp-xpra-devel-1.0.0-1.el7_6.x86_64)
           Requires: libwebp.so.7()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
[root@web ~]# 

Open in new window


Should I try the local directory approach?
Hi,

yes you should give it a try.

Cheers
Just to make sure, after I create the local directory for the repository, I need to move the rpm file there, and after moving it, I proceed to the createrepo command right?
Likely you'll have many ongoing dependency problems if you're building against any PLESK related modules.

Also, keep in mind PHP-7.3.0 has several horrible GD bugs which are fixed in PHP-7.3.1 so best you target building with PHP-7.3.1 to avoid having a build that crashes at runtime.
From Plesk forums it's been suggested to me to use this repo:



It seems to have the dependencies but it also looks old. Could you please tell me if you think I should try this repo?

Thanks.
Thank you both, I was able to get everything working, but for my server configuration I had to use the repo suggested by Plesk forum.

Thanks,

JB.
Hi,

thanks for the feedback and happy to help!

Cheers
The above repo packages a version of WebP which is several years old.

Potentially, images created by such old code may produce images which fail to work with some browsers.