The reason why I want to learn about linux is because of project requirements. Well, I need to call sun's CDC Code. There are a lot of makefiles and there is no way to build the environment first! Ubuntu is different from other linux versions. During installation, the GCC, g ++, and make compilation tools are not installed by default. Enter sudoapt-getinstallbuild-essential tialubuntu in the terminal and the following error is prompted: unable to obtain the lock/var/lib/dpk. The reason why I want to learn linux is because of project requirements, you need to call sun's CDC Code. There are a lot of makefiles and there is no way to do it. Set up the environment first! Ubuntu is different from other linux versions. During installation, the GCC, g ++, and make compilation tools are not installed by default.
Enter:
Sudo apt-get install build-essential
Ubuntu prompts the following error: unable to obtain the lock/var/lib/dpkg/lock, maybe another process is using it. What is the reason? Don't just access the internet. all problems can be solved:
It turns out that I previously executed a sudo apt-get dist-upgrade command to update the software package. This process runs in the background. I don't know, how can I view the currently running process in ubuntu? I learned two more commands, ps and kill:
Ps-e T is used to view all processes currently running, and sort process IDs. You can see that apt-get is running and its ID is 7377.
Kill 7377 to kill the process.
Run the sudo apt-get install build-essential command again. Everything works!
In fact, sudo apt-get install build-essential can install all the compiling environments. We can also install a separate compiling environment, and use the following command: sudo apt-get install gcc
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service