问题描述
运行vcpkg.exe install spdlog时报错:
error: vcpkg's installation database corrupted. This is either a bug in vcpkg or something else has modified the contents of the 'installed' directory in an unexpected way. You may be able to fix this by deleting the 'installed' directory and reinstalling what you want to use. If this problem happens consistently, please file a bug at https://github.com/microsoft/vcpkg .
Package fmt:x64-windows is installed, but dependency vcpkg-cmake:x64-windows is not.
产生原因
一开始用clion(2024版本里面才会自带vcpkg,还特意下了个最新版)里面的vcpkg安装spdlog,但是进度太慢了,然后就在命令行里面用vcpkg.exe 去安装,两边同时操作把vcpkg搞崩了
解决办法
网上解决办法是删除vcpkg.exe的同级目录下里面的installed文件夹,但是我发现只要删除里面的我刚刚安装的spdlog库就行,其他库就不会影响,然后再次安装就可以了
vcpkg.exe install spdlog