virtualBox安装centos6增强包报错解决及配置共享文件夹
一、安装增强包
1、启动CentOS6.5 虚拟机,点击设备à 安装增强功能。
则 “光盘”VBOXADDITIONS已经挂载到 CentOS 5.5 的桌面上了.
此时 双击光盘—>双击VboxLinuxAdditions.run即可完成安装
通常情况下我们直接运行挂载到系统中的VirtualBox 客户端增强功能的组件即可。
2、报错解决:笔者安装时出现报错
Bulding the VirtualBoxGuest Additions Kernel modules [failed]
Your system does not seemto be set up to build kernel modules.
Look at/var/log/vboxadd-install.log to find out what went worg. Once you havecorrected it,you run
/etc/init.d/vboxadd setupto build them
显然内核不支持 缺少编译内核的相关组件,解决方法安装内核组件即可。
[root@localhost ~]# yum install kernel kernel-devel
Loaded plugins: fastestmirror, refresh-packagekit,security
Repository c6-media is listed more than once in theconfiguration
Loading mirror speeds from cached hostfile
* base:mirror.sunnyvision.com
* extras:mirror.sunnyvision.com
* updates:ftp.cuhk.edu.hk
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:2.6.32-642.1.1.el6will be installed
--> Processing Dependency: kernel-firmware >=2.6.32-642.1.1.el6 for package: kernel-2.6.32-642.1.1.el6.x86_64
--> Processing Dependency: dracut-kernel >=004-388.el6 for package: kernel-2.6.32-642.1.1.el6.x86_64
---> Package kernel-devel.x86_640:2.6.32-642.1.1.el6 will be installed
--> Running transaction check
---> Package dracut-kernel.noarch 0:004-335.el6will be updated
---> Package dracut-kernel.noarch0:004-409.el6_8.2 will be an update
--> Processing Dependency: dracut =004-409.el6_8.2 for package: dracut-kernel-004-409.el6_8.2.noarch
---> Package kernel-firmware.noarch0:2.6.32-431.el6 will be updated
---> Package kernel-firmware.noarch0:2.6.32-642.1.1.el6 will be an update
--> Running transaction check
---> Package dracut.noarch 0:004-335.el6 will beupdated
---> Package dracut.noarch 0:004-409.el6_8.2will be an update
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
kernel x86_64 2.6.32-642.1.1.el6 updates 32 M
kernel-devel x86_64 2.6.32-642.1.1.el6 updates 11 M
Updating for dependencies:
dracut noarch 004-409.el6_8.2 updates 127 k
dracut-kernel noarch 004-409.el6_8.2 updates 28 k
kernel-firmware noarch 2.6.32-642.1.1.el6 updates 28 M
Transaction Summary
========================================================================================================================================
Install 2 Package(s)
Upgrade 3 Package(s)
Total download size: 71 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): dracut-004-409.el6_8.2.noarch.rpm | 127 kB 00:01
(2/5):dracut-kernel-004-409.el6_8.2.noarch.rpm | 28 kB 00:00
(3/5): kernel-2.6.32-642.1.1.el6.x86_64.rpm | 32 MB 05:21
(4/5):kernel-devel-2.6.32-642.1.1.el6.x86_64.rpm | 11 MB 01:46
(5/5):kernel-firmware-2.6.32-642.1.1.el6.noarch.rpm | 28 MB 04:51
----------------------------------------------------------------------------------------------------------------------------------------
Total 100 kB/s | 71 MB 12:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating :dracut-004-409.el6_8.2.noarch 1/8
Updating :dracut-kernel-004-409.el6_8.2.noarch 2/8
Updating :kernel-firmware-2.6.32-642.1.1.el6.noarch 3/8
Installing: kernel-2.6.32-642.1.1.el6.x86_64 4/8
Installing: kernel-devel-2.6.32-642.1.1.el6.x86_64 5/8
Cleanup :dracut-kernel-004-335.el6.noarch 6/8
Cleanup :dracut-004-335.el6.noarch 7/8
Cleanup :kernel-firmware-2.6.32-431.el6.noarch 8/8
Verifying :kernel-firmware-2.6.32-642.1.1.el6.noarch 1/8
Verifying :dracut-004-409.el6_8.2.noarch 2/8
Verifying :dracut-kernel-004-409.el6_8.2.noarch 3/8
Verifying :kernel-2.6.32-642.1.1.el6.x86_64 4/8
Verifying :kernel-devel-2.6.32-642.1.1.el6.x86_64 5/8
Verifying :kernel-firmware-2.6.32-431.el6.noarch 6/8
Verifying :dracut-kernel-004-335.el6.noarch 7/8
Verifying :dracut-004-335.el6.noarch 8/8
Installed:
kernel.x86_64 0:2.6.32-642.1.1.el6 kernel-devel.x86_64 0:2.6.32-642.1.1.el6
Dependency Updated:
dracut.noarch 0:004-409.el6_8.2 dracut-kernel.noarch 0:004-409.el6_8.2 kernel-firmware.noarch0:2.6.32-642.1.1.el6
Complete!
[root@localhost ~]# yum install gcc
Loaded plugins: fastestmirror, refresh-packagekit,security
Repository c6-media is listed more than once in theconfiguration
Loading mirror speeds from cached hostfile
* base:mirror.sunnyvision.com
* extras:mirror.sunnyvision.com
* updates:ftp.cuhk.edu.hk
Setting up Install Process
No package gcc++ available.
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-17.el6 will beinstalled
--> Processing Dependency: libgomp =4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cpp = 4.4.7-17.el6for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: libgcc >=4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64
--> Processing Dependency: cloog-ppl >= 0.15for package: gcc-4.4.7-17.el6.x86_64
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6will be installed
--> Processing Dependency: libppl_c.so.2()(64bit)for package: cloog-ppl-0.15.7-1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit)for package: cloog-ppl-0.15.7-1.2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-17.el6 will beinstalled
--> Processing Dependency: libmpfr.so.1()(64bit)for package: cpp-4.4.7-17.el6.x86_64
---> Package libgcc.x86_64 0:4.4.7-4.el6 will beupdated
---> Package libgcc.x86_64 0:4.4.7-17.el6 willbe an update
---> Package libgomp.x86_64 0:4.4.7-4.el6 willbe updated
---> Package libgomp.x86_64 0:4.4.7-17.el6 willbe an update
--> Running transaction check
---> Package mpfr.x86_64 0:2.4.1-6.el6 will beinstalled
---> Package ppl.x86_64 0:0.10.2-11.el6 will beinstalled
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
gcc x86_64 4.4.7-17.el6 base 10 M
Installing for dependencies:
cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k
cpp x86_64 4.4.7-17.el6 base 3.7 M
mpfr x86_64 2.4.1-6.el6 base 157 k
ppl x86_64 0.10.2-11.el6 base 1.3 M
Updating for dependencies:
libgcc x86_64 4.4.7-17.el6 base 103 k
libgomp x86_64 4.4.7-17.el6 base 134 k
Transaction Summary
========================================================================================================================================
Install 5 Package(s)
Upgrade 2 Package(s)
Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00
(2/7): cpp-4.4.7-17.el6.x86_64.rpm | 3.7 MB 00:32
(3/7): gcc-4.4.7-17.el6.x86_64.rpm | 10 MB 01:30
(4/7): libgcc-4.4.7-17.el6.x86_64.rpm | 103 kB 00:00
(5/7): libgomp-4.4.7-17.el6.x86_64.rpm |134 kB 00:00
(6/7): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:01
(7/7): ppl-0.10.2-11.el6.x86_64.rpm |1.3 MB 00:11
----------------------------------------------------------------------------------------------------------------------------------------
Total 114kB/s | 16 MB 02:19
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating :libgcc-4.4.7-17.el6.x86_64 1/9
Installing: ppl-0.10.2-11.el6.x86_64 2/9
Installing: cloog-ppl-0.15.7-1.2.el6.x86_64 3/9
Updating :libgomp-4.4.7-17.el6.x86_64 4/9
Installing: mpfr-2.4.1-6.el6.x86_64 5/9
Installing: cpp-4.4.7-17.el6.x86_64 6/9
Installing: gcc-4.4.7-17.el6.x86_64 7/9
Cleanup :libgomp-4.4.7-4.el6.x86_64 8/9
Cleanup :libgcc-4.4.7-4.el6.x86_64 9/9
Verifying :libgcc-4.4.7-17.el6.x86_64 1/9
Verifying :ppl-0.10.2-11.el6.x86_64 2/9
Verifying :mpfr-2.4.1-6.el6.x86_64 3/9
Verifying :gcc-4.4.7-17.el6.x86_64 4/9
Verifying :libgomp-4.4.7-17.el6.x86_64 5/9
Verifying :cpp-4.4.7-17.el6.x86_64 6/9
Verifying :cloog-ppl-0.15.7-1.2.el6.x86_64 7/9
Verifying :libgomp-4.4.7-4.el6.x86_64 8/9
Verifying :libgcc-4.4.7-4.el6.x86_64 9/9
Installed:
gcc.x86_640:4.4.7-17.el6
Dependency Installed:
cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-17.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
Dependency Updated:
libgcc.x86_64 0:4.4.7-17.el6 libgomp.x86_64 0:4.4.7-17.el6
Complete!
[root@localhost ~]# yum install -y gcc gcc-c++ makekernel-devel
Loaded plugins: fastestmirror, refresh-packagekit,security
Repository c6-media is listed more than once in theconfiguration
Loading mirror speeds from cached hostfile
* base:mirror.sunnyvision.com
* extras:mirror.sunnyvision.com
* updates: ftp.cuhk.edu.hk
Setting up Install Process
Package gcc-4.4.7-17.el6.x86_64 alreadyinstalled and latest version
Package 1:make-3.81-23.el6.x86_64 alreadyinstalled and latest version
Packagekernel-devel-2.6.32-642.1.1.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-17.el6 willbe installed
--> Processing Dependency: libstdc++-devel =4.4.7-17.el6 for package: gcc-c++-4.4.7-17.el6.x86_64
--> Processing Dependency: libstdc++ =4.4.7-17.el6 for package: gcc-c++-4.4.7-17.el6.x86_64
--> Running transaction check
---> Package libstdc++.x86_64 0:4.4.7-4.el6 willbe updated
---> Package libstdc++.x86_64 0:4.4.7-17.el6will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-17.el6will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================
Installing:
gcc-c++ x86_64 4.4.7-17.el6 base 4.7 M
Installing for dependencies:
libstdc++-devel x86_64 4.4.7-17.el6 base 1.6 M
Updating for dependencies:
libstdc++ x86_64 4.4.7-17.el6 base 295 k
Transaction Summary
========================================================================================================================================
Install 2 Package(s)
Upgrade 1 Package(s)
Total download size: 6.6 M
Downloading Packages:
(1/3): gcc-c++-4.4.7-17.el6.x86_64.rpm | 4.7 MB 01:10
(2/3): libstdc++-4.4.7-17.el6.x86_64.rpm | 295 kB 00:03
(3/3): libstdc++-devel-4.4.7-17.el6.x86_64.rpm | 1.6 MB 00:26
----------------------------------------------------------------------------------------------------------------------------------------
Total 67 kB/s | 6.6 MB 01:41
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libstdc++-4.4.7-17.el6.x86_64 1/4
Installing: libstdc++-devel-4.4.7-17.el6.x86_64 2/4
Installing: gcc-c++-4.4.7-17.el6.x86_64 3/4
Cleanup : libstdc++-4.4.7-4.el6.x86_64 4/4
Verifying :gcc-c++-4.4.7-17.el6.x86_64 1/4
Verifying :libstdc++-4.4.7-17.el6.x86_64 2/4
Verifying :libstdc++-devel-4.4.7-17.el6.x86_64 3/4
Verifying :libstdc++-4.4.7-4.el6.x86_64 4/4
Installed:
gcc-c++.x86_64 0:4.4.7-17.el6
Dependency Installed:
libstdc++-devel.x86_64 0:4.4.7-17.el6
Dependency Updated:
libstdc++.x86_640:4.4.7-17.el6
Complete!
[root@localhost ~]# shutdown -r now
安装好相关内核组件,重启centos6.5并再次安装增强包即可顺利安装。
二、建立共享文件夹
1、创建共享文件夹
2、命令行操作
1)、创建共享目录
[root@localhost ~]# mkdir /mnt/share
2)、挂载共享文件
[root@localhost ~]# mount -t vboxsf share/mnt/share
[root@localhost~]# cd /mnt/share
[root@localhostshare]# ls -al
总用量 4
drwxrwxrwx. 1root root 0 6月 15 14:03 .
drwxr-xr-x. 7root root 4096 6月 15 14:06 ..
[root@localhostshare]# ls -al
总用量 12
drwxrwxrwx. 1root root 0 6月 15 2016 .
drwxr-xr-x. 7root root 4096 6月 15 14:06 ..
-rwxrwxrwx. 1root root 7277 5月 12 10:43 DNSS.txt
[root@localhostshare]#
3)、设置开机自动挂载共享文件夹,此处提供两种方法
法1 ,添加到/etc/fstab中
[root@localhost share]# vim /etc/fstab
#
# /etc/fstab
# Created byanaconda on Mon Jun 13 10:16:45 2016
#
# Accessiblefilesystems, by reference, are maintained under '/dev/disk'
# See manpages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=4a3834d1-7ee7-4a62-9981-02f5fd003640/ ext4 defaults 1 1
UUID=01099336-5280-425b-8f81-41eec776a624/boot ext4 defaults 1 2
UUID=19979dd3-99ed-4b33-abe9-61b5145e4b4c/home ext4 defaults 1 2
UUID=28098617-d10c-4d5e-93d8-823960863daeswap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/sr0 /mnt/iso iso9660 ro,loop 0 0
share /mnt/share vboxsf rw,gid=100,uid=1000,auto 00
[root@localhostshare]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 15G 5.1G 9.2G 36% /
tmpfs tmpfs 372M 76K 372M 1% /dev/shm
/dev/sda1 ext4 969M 54M 865M 6% /boot
/dev/sda3 ext4 14G 37M 13G 1% /home
/dev/sr0 iso9660 1.8G 1.8G 0 100% /mnt/iso
share vboxsf 222G 65G 157G 30% /mnt/share
/dev/sr1 iso9660 56M 56M 0 100% /media/VBOXADDITIONS_5.0.20_106931
[root@localhostshare]#
法2:
在系统启动时执行挂载脚本:
#vi/etc/rc.d/rc.local
在文件的最后加入上面手动挂载的命令,比如:
mount -tvboxsf share /mnt/share
[root@localhost share]# vi /etc/rc.d/rc.local
#!/bin/sh
#
# This scriptwill be executed *after* all the other init scripts.
# You can putyour own initialization stuff in here if you don't
# want to dothe full Sys V style init stuff.
touch/var/lock/subsys/local
mount -t vboxsf share /mnt/share
[root@localhost~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext4 15G 5.1G 9.2G 36% /
tmpfs tmpfs 372M 76K 372M 1% /dev/shm
/dev/sda1 ext4 969M 54M 865M 6% /boot
/dev/sda3 ext4 14G 37M 13G 1% /home
/dev/sr0 iso9660 1.8G 1.8G 0 100% /mnt/iso
share vboxsf 222G 65G 157G 30% /mnt/share
/dev/sr1 iso9660 56M 56M 0 100% /media/VBOXADDITIONS_5.0.20_106931
4)、取消挂载
[root@localhost ~]# umount -f /mnt/shared
5)、注意事项:
挂载时提示: /sbin/mount.vboxsf: mounting failed with the error: No suchdevice
则表示没有载入内核模块 vboxfs
[root@localhost ~]# lsmod | grep vboxsf
如果没有结果返回,说明 vboxsf确实没有载入,执行
[root@localhost ~]# modprobe vboxsf
再次执行以上步骤即可
virtualBox安装centos6增强包报错解决及配置共享文件夹相关推荐
- gpt磁盘标签linux,解决安装CentOS6.5时 报错 提示“sda 必须有一个GPT磁盘标签”
解决安装CentOS6.5时 报错 提示"sda 必须有一个GPT磁盘标签" 今天想在thinkpad t430u上安装CentOS6.5 时总共遇到了两个问题 1> u盘安 ...
- linux系统Nginx下载安装步骤(含报错解决方法)
linux系统Nginx下载安装步骤(含报错解决方法) 基础步骤 安装过程可能出现的报错及解决方法 执行 ./configure --prefix=/opt/nginx 报错 执行 make inst ...
- Python在指定环境下安装第三方库的报错解决办法
Python在指定环境下安装第三方库的报错解决办法 在python安装第三方库时,如果直接打开cmd命令提示符,并输入下列安装命令,则会默认安装在base环境下 但base环境下的包新建的虚拟环境是无 ...
- Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/redis-server.
此文首发于我的个人博客:Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/r ...
- 记录版本更新安装时解析包报错
记录版本更新安装时解析包报错 2020-07-09 17:05:52.785 24157-24213/? W/OPInstallStaging: Error staging apk from cont ...
- go module 导入本地嵌套包报错解决办法
现在换了一份工作,虽然还是做IT,但是与原来的行业毕竟不一样,有很多新东西需要学习.现在,每一天都很充实,所以很久没有更新博客了(给自己的懒惰,找个借口) 好了,言归正传,聊聊今天的主题------g ...
- Mysql8.0.16 连接包报错解决方法
Mysql8.0.16 连接包报错解决方法 Mysql8.0 .16连接包报错: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized o ...
- python安装cv2包报错解决方法
1.在pycharm中安装cv2包报错 ERROR: Could not find a version that satisfies the requirement cv2 (from version ...
- 《Python笔记》安装(pip)第三方包报错
目录 Python版本 报错信息 pip 安装numpy报错 pip 安装 scipy报错 pip 安装 pywin32 报错 解决办法 网络方法1 网络方法2 请测解决方法 Python版本 $ p ...
最新文章
- 计算机在幼儿园美术区域的应用,让幼儿在美术区域活动中快乐成长!
- 可持续农业生态系统中的核心微生物组
- ad远程控制用户计算机,远程控制电脑|远程控制计算机|怎样远程控制电脑 - ManageEngine Remote Access Plus...
- 解决Layui的switch样式显示问题
- python3.7.2教程-python 3.7极速入门教程2 Hello与变量
- 跟我一起写 Makefile(十一)
- FFMPEG AVDictionary 配置参数
- 计算机网络IP分配大题,2018年IP分片网络大题
- 窥探Swift之别样的枚举类型
- Go语言---结构体
- 用CAJViewer识别图片文字
- vbs编程中 on error resume next的意思
- FAT16 FAT32 NTFS exFAT ReFS
- EXCEL之画带数据点的折线图只有点没有线
- QFD修改工作流并重新发布中的问题
- 牛客编程语言练习赛第三场(C++)
- linux服务器端口使用drcom拨号联网
- java汉字转换拼音,获取汉字串拼音首字母
- Layui的layer.confirm弹框用法,很详细
- 一篇文章带你弄懂乐观锁与悲观锁,CAS原子性,synchronized底层原理
热门文章
- 移动端:苹果开发者账号Apple Developer Program
- 接码平台源码_你的票被服务器上的爬虫“吃”了,本文解析爬虫抢票的源码!...
- 5分绩点转4分_5分制绩点换算成4分制(5.0绩点计算器在线)
- 网页链接跳转qq聊天界面以及QQ群是什么实现的
- 在本地电脑将ip与名字相关联
- (激励自己学习)努力吧,现在也不晚(转)
- 安卓APP源码和设计报告——智能垃圾桶
- 四步快速配置一个简单高效的文本生成图像基准模型 T2I baseline
- 网易易盾-滑块-cb参数
- 双搜----用两只眼睛看世界