virtual box實現centos和windows共用資料夾

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   os   使用   ar   檔案   

    今天在要實現centos(在virtualbox中)和windows實現共用資料夾的過程中遇到諸多錯誤,費了一下午時間來搞這個,首先配置共用資料夾的方法就不介紹了,這裡面介紹的是在配置的過程中遇到的諸多錯誤
  1. 在VirtualBox的菜單裡選擇“裝置”->“安裝增強功能包(Install Guest Additions)”
  2. 之後案頭會出現一個光碟片,在命令列裡輸入:
    • cd /media/VBOXADDITIONS_4.3.12_93733/
    • 然後輸入sudo ./VBoxLinuxAdditions.run 
  3. 然後神奇的事情發生了,在安裝增強功能包的時候,就出現了錯誤,如下
    • Building the main Guest Additions module [FAILED]
    • (Look at /var/log/vboxadd-install.log to find out what went wrong)
  4. 思索著難道是VirtualBox版本過舊嗎?於是更新VirtualBox,依然於事無補
  5. 於是進入日誌查看發生了什麼(/var/log/vboxadd-install.log)
  6. 日誌裡面這麼寫著(Error: unable to find the sources of your current Linux kernel.Specify KERN_DIR=<directory> and run Make again)
  7. 奇怪,這個玩意居然說不知道當前的linux kernel源,在一個外文網站發現老外遇到同樣的問題,搞了n久之後終於起效,哎,痛苦的一筆。
  8. 先是試了如下命令:
    1. $ sudo yum updatethen
    2. $ sudo yum install kernel-devel gcc
    3. $ echo export KERN_DIR=/usr/src/kernels/`uname -r` >> ~/.bashrc
  9. 然後又試了如下命令:
    1.  yum install kernel* dkms gcc
    2. Then
    3. yum install kernel-uek-devel
    4. Then reboot your machine
  10. 之後沒有重啟,試著重新安裝增強功能包,依然錯誤,重啟之後又試了這兩個命令:yum install kernel* dkms gcc;yum install kernel-uek-devel,完事,安裝增強功能包:
    Installing additional modules ...Removing existing VirtualBox non-DKMS kernel modules [ OK ]Building the VirtualBox Guest Additions kernel modulesBuilding the main Guest Additions module [ OK ]Building the shared folder support module [ OK ]Building the OpenGL support module [ OK ]Doing non-kernel setup of the Guest Additions [ OK ]Starting the VirtualBox Guest Additions [ OK ]Installing the Window System driversInstalling X.Org Server 1.13 modules [ OK ]Setting up the Window System to use the Guest Additions [ OK ]You may need to restart the hal service and the Window System (or just restartthe guest system) to enable the Guest Additions.
    終於看到綠色的ok了,真是太不容易了,然後繼續mount -t vboxsf linux_share /mnt/share,linux_share是在VirtualBox中設定的共用檔案名稱,/mnt/share是centos中建立的檔案夾,注意兩個檔案夾名字最後不要一樣,防止出現其他錯誤。
  11. 後來在測試的時候,我使用的是xshell,發現這玩意不支援中文,真是跪了,中國人太不容易了,特別是程式員,幸好在網上發現了這個,好東西啊,就要共用啊
  12. http://moralistxp.blog.163.com/blog/static/1161103982013112411540183/
  13. http://jingyan.baidu.com/article/3ea51489eca4b452e61bbaca.html

virtual box實現centos和windows共用資料夾

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.