Kennisbank

The libwebp-tools package is missing in the CloudLinux 8.5 repository

CloudLinux OS is an operating system built specifically for shared hosting environments. It is known for improving stability, security, and performance, primarily in server environments. CloudLinux uses CentOS as its base, with a few additional features aimed at isolating users to improve the overall experience for shared hosting customers.

WebP is a modern image format developed by Google that provides both lossless and lossy compression for images on the web. It supports both transparency (like PNG) and animation (like GIF), making it an attractive option for optimizing images and improving web performance.

The libwebp-tools package provides various utilities to manage and convert images to and from the WebP format. These tools include cwebp, dwebp, and gif2webp, which are essential for converting image files into WebP format or for decoding WebP images. However, some users may encounter issues where the libwebp-tools package is missing from the CloudLinux 8.5 repository, leading to problems in their workflow.

Understanding the Situation

CloudLinux 8.5, based on CentOS 8, often follows the upstream CentOS repositories for package availability. When a package is missing from CloudLinux repositories, it could be due to several reasons:

  • The package may not be included by default in the distribution's repository list.
  • The repository configuration might have changed.
  • Package availability might differ between distributions, especially for packages with proprietary or licensing restrictions.

The libwebp-tools package is widely used in web optimization workflows, especially for reducing image size while maintaining quality. Its absence from CloudLinux repositories can lead to issues for web administrators and developers who rely on WebP images.

How to Check if a Package is Missing

When working with CloudLinux or any other Linux distribution, package availability can be checked using the following command:

sudo dnf list libwebp-tools

If the package is not found, the terminal will return a message stating that it is not available.

Exploring Possible Reasons for Missing Package

There are several reasons why the libwebp-tools the package might not be found in the CloudLinux 8.5 repository:

  1. Repository Configuration Issues:
    • The CloudLinux repositories might not have the libwebp-tools package available by default.
    • Sometimes, packages might not be included in the base repository but might be available through additional repositories or third-party repositories.
  2. Package Version Discrepancies:
    • It is also possible that the package might be available in a different version. If the package was included in an earlier version of CloudLinux or CentOS, it may have been excluded from the newer releases.
  3. Security Concerns or Licensing:
    • Some software packages might not be included in certain Linux distributions due to security concerns or licensing issues.
    • Google’s WebP image format might have legal or licensing restrictions that prevent it from being included in certain distributions by default.

Checking and Installing the Package from Other Sources

Even if the libwebp-tools package is missing from the official CloudLinux repository, there are several workarounds to install it.

Installing from EPEL Repository

The Extra Packages for Enterprise Linux (EPEL) repository is a widely used repository for additional packages on CentOS and Red Hat-based systems. This repository might contain the libwebp-tools package. Here’s how to enable and install from EPEL:

sudo dnf install epel-release sudo dnf update sudo dnf install libwebp-tools

Building from Source

If the package is not available in any repository, you can always download the source code and compile it yourself. Follow these steps to build the package from the source:

  1. Install Dependencies:

     
    sudo dnf install gcc make wget sudo dnf install libwebp-devel
  2. Download the Source Code: Go to the WebP project page to download the latest stable release of WebP. Alternatively, use wget to fetch the source:

     
    wget https://storage.googleapis.com/downloads.webmproject.org/webp/stable/webp-1.2.2.tar.gz
  3. Extract and Build:

     
    tar -xvzf webp-1.2.2.tar.gz cd webp-1.2.2 make sudo make install
  4. Verify Installation: After installation, check if the tools are available by typing:

     
    cwebp -version

Using Third-Party Repositories

If neither the CloudLinux repository nor the EPEL repository provides the package, you might want to look into third-party repositories like Remi or RPM Fusion that offer additional software for RHEL-based systems. Install these repositories and search for the package:

sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm sudo dnf install libwebp-tools

Using WebP Tools Effectively

Once you have libwebp-tools installed, here’s a quick guide to some of the key tools and their usage.

web: Convert Images to WebP Format

The cwebp command is used to convert various image formats (JPEG, PNG, TIFF) to WebP format. Example usage:

cwebp input.jpg -o output.webp

You can specify quality, lossless compression, and other options:

cwebp -q 80 input.jpg -o output.webp

web: Convert WebP Images to Other Formats

The dwebp command decodes WebP images and converts them back into other formats such as PNG or JPEG. Example usage:

dwebp input.webp -o output.png

gif2webp: Convert Animated GIFs to WebP

WebP also supports animated images, so you can use it gif2webp to convert animated GIFs to WebP format, which often results in smaller file sizes. Example usage:

gif2webp input.gif -o output.webp

Alternative Image Conversion Tools

If libwebp-tools is still not available or suitable for your use case, you may want to look into other image conversion tools, such as:

  1. ImageMagick: ImageMagick is a powerful tool for converting, editing, and composing images. It supports WebP format as well and can be installed using:

     
    sudo dnf install ImageMagick
  2. Pillow: Pillow is a Python Imaging Library (PIL) fork and can be used to handle WebP format images in Python scripts.

  3. GIMP: The GNU Image Manipulation Program (GIMP) supports WebP format and can be used for manual conversions and editing.

Troubleshooting Common Issues

  1. Missing Dependencies: If during installation you face missing dependencies, you can resolve them by using:

     
    sudo dnf install libwebp-devel
  2. Incompatible WebP Versions: Ensure that the version of libwebp-tools you are installing is compatible with your version of CloudLinux 8.5.

  3. Permission Issues: If you run into permission issues while installing or using the package, ensure that your user account has sufficient permissions or use sudo to run commands as the root user.

  • 0 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?