CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file

CMake Error at libmysqld/cmake_install.cmake:36 (FILE):
  file INSTALL cannot copy file

在安装MySQL时,make install 时出现如此错误:

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第1张图片

CMake Error at libmysqld/cmake_install.cmake:36 (FILE):
  file INSTALL cannot copy file
  "/home/mysql-5.7.29/archive_output_directory/libmysqld.a" to
  "/usr/local/mysql/lib/libmysqld.a".
Call Stack (most recent call first):
  cmake_install.cmake:115 (INCLUDE)


原因:是因为磁盘空间已满所导致,可用过Linux命令 df -h 查看磁盘使用情况

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第2张图片

解决方法如下:

若使用VMware创建的虚机,可以通过扩展磁盘的大小,选择设置

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第3张图片

注意,修改磁盘大小时需要在关机的情况下修改,如下图:

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第4张图片

正常增加一定的大小就可以,这里因为我的虚机上有快照,是不能在原有的磁盘上修改大小,只能通过新添加一块磁盘

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第5张图片

添加一块磁盘之后,默认为sdb

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第6张图片

这里我们需要做的就是扩容了(通过LVM)

详细操作可以参考原网址:https://www.cnblogs.com/liyy7520/p/11905979.html

最终make install通过

CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file_第7张图片

你可能感兴趣的:(CMake Error at libmysqld/cmake_install.cmake:36 (FILE): file INSTALL cannot copy file)