We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Help building PHP 7.3.0 with WebP support

Jorge Batres
Jorge Batres asked
on
High Priority
734 Views
Last Modified: 2019-01-14
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
Comment
Watch Question

David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
CERTIFIED EXPERT

Commented:
Hi,

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

Cheers
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.

Author

Commented:
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
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.

Author

Commented:
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.

Author

Commented:
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
CERTIFIED EXPERT

Commented:
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

Author

Commented:
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?
CERTIFIED EXPERT
Commented:
Hi,

yes,

but if you don't want a repo though than you can try:

 yum --nogpgcheck localinstall libwebp-xpra-devel-1.0.0-1.el7_6.x86_64.rpm

Open in new window


WIth a repo you can just use yum install and it will always install the dependencies needed.

Cheers

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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?
CERTIFIED EXPERT

Commented:
Hi,

yes you should give it a try.

Cheers

Author

Commented:
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?
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.

Author

Commented:
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.

Author

Commented:
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.
CERTIFIED EXPERT

Commented:
Hi,

thanks for the feedback and happy to help!

Cheers
David FavorFractional CTO
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.