configure: error: off_t undefined; check your library configuration


configure: error: off_t undefined; check your library configuration




发生背景:


编译PHP时出现的提示,报错信息为: configure: error: off_t undefined; check your library configuration 。




解决方案:


(1)输入以下命令,添加搜索路径到配置文件:
    echo '/usr/local/lib64 /usr/local/lib /usr/lib /usr/lib64'>>/etc/ld.so.conf
(2)更新配置
    ldconfig -v






参考资源:  https://www.kwx.gd/PHPEnvironment/CentOS-PHP-off-t.html。  https://blog.csdn.net/xlelou/article/details/86488710。