Recently I signed up for an online advanced front-end course. One of the requirements of the course is to use Linux and MAC as much as possible to develop. Windows is ok but not recommended, so I tried to install a VirtualBox VIRTUAL machine and then added an Ubuntu virtual machine to the virtual machine. Installing an Ubuntu virtual machine is easy, and there are many tutorials available online. Let me just mention a few things that have happened to me since I installed Ubuntu.

After the virtual machine is installed, Ubuntu is normally restarted (unless otherwise specified), and then the Ubuntu software source is changed to Ali software source, and then the Vbox enhancement is installed. There was a small incident when I changed the software source. Originally, I found the method of changing the software source in the Chrome browser of the host (virtual machine program host computer, called host, the same below). One step of changing the software source is to modify the configuration file, and the method given online is to back up the original file first. I then overwrote the original content of the file with the new content. Because the Vbox enhancement was not installed, I could not share the stickboard between the host and Ubuntu, and I could not paste the replacement configuration content from the host to Ubuntu. I had to open the Firefox browser in Ubuntu, and enter the web address one by one in the address bar. After the page is refreshed, find the corresponding code and assign the code to it.

There was also a problem when installing Vbox enhancement program, the error as shown in Figure 1 appeared, the reason should be the lack of some dependent libraries, the error as shown in Figure 2 appeared when installing dependent libraries, I saw on the Internet that someone said aptitude could solve this kind of thing, I used apt-get to install the tool, and then used Aptitude tool to install the library that Vbox enhancement relied on, but found stuck in tty character terminal interface after rebooting Ubuntu. After searching on the Internet, I found that all my applications were deleted because of aptitude. That includes the Ubuntu desktop. Most of the solutions offered online were to reinstall the Ubuntu desktop using APT, but APT was removed after the aptitude was successfully installed (which was later discovered when the process was re-created). Have to delete the old virtual computer, reinstall again, this is also the benefit of using a virtual machine, do not want to be free to delete.

After installing Ubuntu again, MY brain got hot and I installed aptitude again. Fortunately, when I was using Aptitude to install the class library, I stopped in time and found that APT had been deleted. I was trying to install APT in the following hours. Most articles on the Internet talked about how to use APT to download and install programs and the difference between APT and aptitude, but almost no article introduced how to install APT after uninstalling APT. We also tried to use aptitude to install APT, but aptitude didn’t give any solution. Later I learned that I could use DPKG to install APT, so I spent nearly an hour trying to install APT with DPKG and trying various parameters of DPKG command. Later I found that DPKG can only install local packages, it needs a **.deb** package. Find the.deb package of apt tool on the Internet. After I finally found one, I downloaded it and installed it with DPKG command. I found that although APT was successfully installed, there were still errors when I used it, just as shown in Figure 3.

Finally I had to delete Ubuntu again and install it again. This time I learned to be good and did not install aptitude and only used APT to install the program. When using APT to install, sometimes there will be a need for another package to install a program, but the installation of this dependency package will be found to depend on another package. I lost patience with the Ubuntu package dependencies and didn’t try again.