Linux operation notes

Source: Internet
Author: User

1. When you enter the make command on the terminal to compile a file, the error "C ++: Command not found" appears. Cause of this error: the C ++ compiling environment has not been installed.

Solution: Run sudo apt get-install g ++.


2. Install the "enhanced version" gedit text editor command

Features supported by this enhanced version include: Advanced bookmarking, class queryer, grep for specific content, word completion, and highlighted code

Command:

Sudo apt-add-repository PPA: Ubuntu-on-rails/PPA
Sudo apt-Get update
Sudo apt-Get install gedit-gmate

3. Set VI syntax highlighting, automatic indentation, and other functions

First, upgrade Vim to the new version, as described in the fifth point below. Run the following command: sudo gedit/etc/Vim/vimrc.

Modify the vim configuration file:

1) Ubuntu Vim display line number: Add a new line at the end of the file and enter SET nu

2) Ubuntu Vim syntax highlighting: Find "syntax on" in the file and remove the double quotation marks. Double quotation marks are comments.

3) Ubuntu Vim auto indent: add a line at the end of the file and enter SET autoindent. Add another row and enter SET cindent. Autoindent indicates automatic indent, and cindent indicates automatic indent for C language syntax.

4. Install the dependency Library first when installing ice in Ubuntu, installation Tutorial: http://duckweeds.blog.sohu.com/95443260.html

Install dependency library command: APT-Get install libdb4.6 +-dev libbz2-dev Bzip2 libssl-dev libreadline5-dev libexpat1-dev MCPP

 

5. Enter the command: vi xx. cpp. after entering the VI editor, you cannot switch to the editing mode. Cause: the vim editing environment has not been installed.

Solution: sudo apt-Get install Vim


6. Install the enhanced functions in Ubuntu in vbox. The enhanced functions of virtualbox virtual machine can be implemented as follows:

1) file sharing between the host and the Virtual Machine (mainly for this purpose ).

2) share the clipboard between the host and the Virtual Machine (share the value assignment copy and paste function ).

3) direct3d support for virtual machines is to allocate point video memory for the virtual machines, so that the virtual machine window can be scaled up or down (the premise is to select "automatically adjust the display size ").

Step: select "devices"-> "Install guest additions" from the virtualbox menu )". An extra CD icon is displayed on the Ubuntu 10.04 desktop, indicating that the disk is successfully loaded. Enter the command line terminal, enter CD/media, and find the appropriate version of the running file, sudo. /vboxlinuxadditions. run, or sudo. /Autorun. sh start to install the toolkit. After installation, you will be prompted to restart ubuntu.


7. Use the command to install JDK: sudo apt-Get install default-JDK or sudo apt-Get install sun-java6-jdk


8. When installing ice, the error 'could not access: ../ice_license 'occurs. I tried many methods and installed some dependent libraries, but the result still failed.

Finally, I changed the ice version. I wanted to install ice-3.4.1 before, and then I downloaded and installed ice-3.4.2 again. The result was successful. Download location

Address: http://www.zeroc.com/download.html. Select the ice-3.4.2.tar.gz package of source distributionon the page to download.

Installation Process: Decompress tar-xzvf Ice-3.4.2.tar.gz ---> Cd ice-3.4.2/CPP ---> compile make ---> install sudo make install.

9. When running eclipse in Ubuntu, the keyboard input is often invalid or does not respond. solution:

The reason is the compatibility between the current input method selected by terminal and eclipse and the input method installed by the user. In the work area of terminal and eclipse, click right --> input method (input method in English) --> scim XXXXX. If you are using the scim input method, but there are no options such as scim, it may be that the scim-bridge-GTK package is not installed properly. Close eclipse first, then, use aptitude install scim-bridge-GTK to install it. Then, re-open eclipse and you should have scim options.

10. when the program is compiled, the following message is displayed: Undefined reference to 'pthread _ create '... the compiler cannot recognize the pthread function because the-lpthread option is not added. This option specifies the link to the pthread library during compilation.

For example, G ++ server. cpp-O Server-lpthread

Contact Us

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

  • 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.