VirtualBox Ubuntu增强功能安装及gcc 安装

VirtualBox Ubuntu 增强功能安装及gcc 安装

  • 安装步骤
  • 安装遇到的问题
    • 1.install the gcc make perl packages
    • 2.Unable to lock the administration directory

  • 安装环境
    • ubuntu-18.04
    • VirtualBox-5.2.22

安装步骤

1.点击菜单栏的”设备“–>安装增强功能
VirtualBox Ubuntu增强功能安装及gcc 安装_第1张图片
2.按照提示进行安装,运行软件
VirtualBox Ubuntu增强功能安装及gcc 安装_第2张图片


安装遇到的问题

1.install the gcc make perl packages

运行增强功能以后出现

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.2.12 Guest Additions for Linux........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel modules.
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
VirtualBox Guest Additions: Starting.
Press Return to close this window...

在网上查找并且尝试了多种方法,抓耳挠腮一晚上都没办法顺利完成安装。最后在Ubuntu的论坛找到了解答。在terminal中输入以下命令:

sudo apt-get update
sudo apt-get install build-essential gcc make perl dkms
reboot

原文请点击这里。

2.Unable to lock the administration directory

在安装gcc使用apt-get命令时,遇到了以下小小的问题:

Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

网上查找资料后得到了解决办法,在terminal中输入以下命令:
//delete the lock file
//delete the lock file in the cache directory

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

原文请点击这里


最后顺利完成unbuntu增强功能的安装,done~
VirtualBox Ubuntu增强功能安装及gcc 安装_第3张图片
写博客只是想总结学习过程以及学习过程中的小小问题,以防自己记性不好总是忘了问题怎么解决的,下次遇到同样的问题还得从头来过~~还请大家多多指教鸭!

你可能感兴趣的:(VirtualBox Ubuntu增强功能安装及gcc 安装)