解决Apache服务无法启动:'C:\\Windows\\SYSTEM32\\VCRUNTIME140.dll' 14.0 is not compatible with this PHP 经验

Quibbler 2023-6-3 3756

解决Apache服务无法启动:'C:\\Windows\\SYSTEM32\\VCRUNTIME140.dll' 14.0 is not compatible with this PHP


        博客后台数据库很久没有维护备份,趁周末准备备份一下。先启动Apache服务,但是发现启动不了:

        “大风大浪”的报错都见过,处理这点问题不在话下。先查看启动Apache的错误日志Apache (error.log)


        找到错误日志:

        [Sat Jun 03 21:53:19.789045 2023] [ssl:warn] [pid 600:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name

PHP Warning:  'C:\\Windows\\SYSTEM32\\VCRUNTIME140.dll' 14.0 is not compatible with this PHP build linked with 14.29 in Unknown on line 0

        [Sat Jun 03 21:53:19.823045 2023] [:emerg] [pid 600:tid 428] AH00020: Configuration Failed, exiting

        这次Apache启动不了的原因是:当前PHP版本与需要用到的Visual Studio的Microsoft Visual C ++ Redistributable版本不兼容导致。


        访问Visual Studio开发官网,选择其它工具、框架和可再发行组件,下载最新版本的Microsoft Visual C++ Redistributable for Visual Studio(下载地址:https://visualstudio.microsoft.com/zh-hans/downloads/)。


        下载并安装 Visual C++ 库的运行时组件:

        安装完成后,再次启动Apache服务即可正常运行。


        回想起上学的时候用C/C++开发,经常因为运行调试环境缺各种库而备受“折磨”。一个项目从实验室的一台电脑复制到另一台电脑上运行调试不了,因为库依赖折腾半天常有的事。


不忘初心的阿甘
最新回复 (0)
    • 安卓笔记本
      2
        登录 注册 QQ
返回
仅供学习交流,切勿用于商业用途。如有错误欢迎指出:fluent0418@gmail.com