Parallels 10(v10.40) ubuntu desktop 14.04.4 無法安裝Parallels tools

終於搞定了這個該死的問題,一直用paralles在mac上安裝ubuntu,而且買的正版軟件,可惜parallels是個提了褲子就不認賬的主,本來有個ubuntu14.04虛擬機,升級了一下ubuntu導致我無法登陸,後來就索性刪除了這個系統,直接重新安裝ubuntu,可惜最後無法安裝parallels tools,我用的是parallels 10的最新版v10.4.0,一直提示無法安裝parallels tools,後來安裝ubuntu 16.04,也無法安裝Parallels tools,在官網上也沒有提供爲什麼這樣,後來他的官方論壇裏找到了問題的解決方案,

地址:https://forum.parallels.com/threads/parallels-10-ubuntu-14-04-tools-will-not-install.336252/
用這個論壇的第8樓的解決方案就可以完美解決問題,我用中文記錄如下

  1. 掛載 Parallels Tools鏡像
  2. 打開一個terminal,執行如下命令(注意:這些命令一定要用命令行,不要用UI工具代替來執行,否則會有很多莫名其妙的錯誤,我第一次就遇到了好多錯誤)

    cd /media/<username>/Parallels\ Tools/
    mkdir ~/Desktop/tools
    cp -pr * ~/Desktop/tools
    cd ~/Desktop/tools
    chmod -R 777 kmods
  3. 用解壓縮工具打開~/Desktop/tools/kmods目錄下的prl_mod.tar.gz壓縮文件

  4. 在壓縮工具裏用gedit打開./prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c,在其他include的代碼後面添加如下代碼

    
    #include <linux/vmalloc.h>
    
  5. 在壓縮工具裏用gedit打開./prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c,找到prlfs_follow_link (大約在650行)並修改爲如下代碼(包括 compat_follow_link_t):

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
#define compat_follow_link_t const char*
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
#define compat_follow_link_t void*
#else
#define compat_follow_link_t int
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
static compat_follow_link_t prlfs_follow_link(struct dentry *dentry, void  **cookie)
#else
static compat_follow_link_t prlfs_follow_link(struct dentry *dentry, struct nameidata *nd)
#endif
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
    return do_read_symlink(dentry);
#else

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
        nd_set_link(nd, do_read_symlink(dentry));
    #endif

    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
        return NULL;
    #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
        return 0;
    #else
        return vfs_follow_link(nd, do_read_symlink(dentry));
    #endif
#endif
}
  1. 打開一個terminal (在~/Desktop/tools目錄)並執行如下命令:

    sudo ./install
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章