VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)

2023-03-17 1281阅读

温馨提示:这篇文章已超过737天没有更新,请注意相关的内容是否还可用!

首先,我们需要了解一下Centos mini是什么。当我们使用VMware workstation安装Centos mini时,可能会出现以下提示:/etc/rc5.d/S99local: line 3: /etc/rc.d/init.d/local: No such file or directory/etc/rc5.d/S99local: line 4: /etc/rc.d/init.d/functions: No such file or directory这是因为Centos mini缺少一些必要的文件,导致在启动时无法找到这些文件。/bin/sh## Local initialization script#touch /var/lock/subsys/local保存并退出。除了在安装Centos mini时可能会遇到问题外,有时在安装Centos 7时也会出现类似的报错。总之,无论是在安装Centos mini还是Centos 7时遇到问题,我们都可以通过手动创建文件、安装VMware Tools、重新配置等方法来解决。
VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)
(图片来源网络,侵删)
VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办(vmware安装centos7报错)
(图片来源网络,侵删)

VMware workstation安装Centos mini报错/etc/rc5.d/s99local怎么办及vmware安装centos7报错

VMware workstation是一款常用的虚拟机软件,它可以在Windows、Linux和Mac OS X等平台上运行,提供了一个虚拟化环境,使用户可以在一台计算机上同时运行多个操作系统。然而,在安装Centos mini时,有时会遇到/etc/rc5.d/s99local报错的问题,这该怎么办呢?

首先,我们需要了解一下Centos mini是什么。Centos是一种基于Red Hat Enterprise Linux(RHEL)的开源操作系统,它被广泛应用于服务器领域。而Centos mini则是一个精简版的Centos,只包含最基本的软件包,适合用于构建轻量级的服务器。

当我们使用VMware workstation安装Centos mini时,可能会出现以下提示:

/etc/rc5.d/S99local: line 3: /etc/rc.d/init.d/local: No such file or directory

/etc/rc5.d/S99local: line 4: /etc/rc.d/init.d/functions: No such file or directory

这是因为Centos mini缺少一些必要的文件,导致在启动时无法找到这些文件。为了解决这个问题,我们需要手动创建这些文件,并将其放置到正确的位置上。

具体步骤如下:

1. 创建local文件

在终端中输入以下命令:

sudo nano /etc/rc.d/init.d/local

在打开的文件中,输入以下内容:

#!/bin/sh

#

# Local initialization script

#

touch /var/lock/subsys/local

保存并退出。

2. 创建functions文件

在终端中输入以下命令:

sudo nano /etc/rc.d/init.d/functions

在打开的文件中,输入以下内容:

#!/bin/bash

# /etc/rc.d/init.d/functions

# This file contains functions to be used by most or all shell scripts in the

# /etc/init.d directory.

# Check for interactive shell

if [ -z "$PS1" ]; then

return

fi

# Source function library.

. /etc/init.d/functions

保存并退出。

3. 设置权限

在终端中输入以下命令:

sudo chmod 755 /etc/rc.d/init.d/local

sudo chmod 755 /etc/rc.d/init.d/functions

4. 创建软链接

在终端中输入以下命令:

sudo ln -s /etc/rc.d/init.d/local /etc/rc5.d/S99local

完成以上步骤后,再次启动Centos mini,就不会再出现/etc/rc5.d/s99local报错的问题了。

除了在安装Centos mini时可能会遇到问题外,有时在安装Centos 7时也会出现类似的报错。例如,当我们使用VMware workstation安装Centos 7时,可能会出现以下提示:

The installation of VMware Tools 10.3.22 build-15902021 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes]

Initializing...

Stopping VMware Tools services in the virtual machine:

Guest operating system daemon: [FAILED]

VMware User Agent (vmware-user): [ OK ]

Unable to start services for VMware Tools

这是因为安装VMware Tools时出现了错误,导致无法启动服务。为了解决这个问题,我们需要手动安装VMware Tools,并重新配置它。

具体步骤如下:

1. 安装VMware Tools

在VMware workstation中,选择“VM”菜单下的“Install VMware Tools”,然后将光盘映像挂载到虚拟机中。

在终端中输入以下命令:

mkdir /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

tar xzf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/

进入解压后的目录,执行以下命令:

cd /tmp/vmware-tools-distrib

sudo ./vmware-install.pl

按照提示进行安装。

2. 配置VMware Tools

在终端中输入以下命令:

sudo /usr/bin/vmware-config-tools.pl

按照提示进行配置。

3. 启动VMware Tools服务

在终端中输入以下命令:

sudo systemctl start vmtoolsd.service

完成以上步骤后,再次启动Centos 7,就不会再出现Unable to start services for VMware Tools的问题了。

总之,无论是在安装Centos mini还是Centos 7时遇到问题,我们都可以通过手动创建文件、安装VMware Tools、重新配置等方法来解决。这些方法虽然有些繁琐,但可以帮助我们顺利地完成虚拟机的安装和配置。

有云计算,存储需求就上慈云数据:点我进入领取200元优惠券
VPS购买请点击我

免责声明:我们致力于保护作者版权,注重分享,被刊用文章因无法核实真实出处,未能及时与作者取得联系,或有版权异议的,请联系管理员,我们会立即处理! 部分文章是来自自研大数据AI进行生成,内容摘自(百度百科,百度知道,头条百科,中国民法典,刑法,牛津词典,新华词典,汉语词典,国家院校,科普平台)等数据,内容仅供学习参考,不准确地方联系删除处理! 图片声明:本站部分配图来自人工智能系统AI生成,觅知网授权图片,PxHere摄影无版权图库和百度,360,搜狗等多加搜索引擎自动关键词搜索配图,如有侵权的图片,请第一时间联系我们,邮箱:ciyunidc@ciyunshuju.com。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!

目录[+]