RHEL / CentOS Xcache: /usr/include/php/ext/date/lib/timelib_structs.h:24:28: error: timelib_config.h: No such file or directory Error and Soultion
The error message you are seeing is typically caused by a missing file called "timelib_config.h", which is required by the timelib library used by Xcache.
Here's how to fix the error:
- Install the required dependencies:
sudo yum install gcc make automake autoconf httpd-devel php-devel php-pear libmcrypt-devel libpng-devel libjpeg-devel freetype-devel libXpm-devel gmp-devel libxml2-devel openssl-devel libicu-devel libtidy-devel libxslt-devel- Download and install the timelib library:
cd /usr/src/
sudo git clone https://github.com/php/php-src.gitrncd php-src/ext/date/
sudo phpizernsudo ./configurernsudo makernsudo make install- Copy the timelib_config.h file to the correct location:
sudo cp /usr/src/php-src/ext/date/lib/timelib_config.h /usr/include/- Reinstall Xcache:
sudo pecl uninstall xcachernsudo pecl install xcache- Finally, restart your web server:
sudo systemctl restart httpdAfter completing these steps, the Xcache extension should be installed without errors.
Note that the specific steps may vary depending on your version of RHEL/CentOS, and the version of Xcache that you are installing. It's always a good idea to check the Xcache documentation for specific instructions.
