Using the Package Manager in Ubtuntu Linux-brew

Source: Internet
Author: User
Tags ubuntu package manager

Accustomed to the Mac programmer back to the Linux development platform always feel a bit uncomfortable, this is because the interface of Linux is not as beautiful as the Mac, and the Linux Package Manager is not as powerful as the homebrew on the Mac. When a Mac programmer encounters a library dependency problem, The first thing that comes to mind is brew search, and then home install. In comparison, although the Ubtuntu also provides apt package manager, but the above library resources is very old, because it is based on the installation of binary installation package, so the environment is very strict requirements, not satisfied directly cannot be installed. For example, :

sudo apt-get install mysql++

Because the MySQL version installed on the system is 5.7.12, the installation package that is hosted on the Ubuntu Package Manager server is only available for MySQL version 5.5.49, so it cannot be installed directly, is this not the pit daddy? Embrace the transformation and find that homebrew is also ported to the Linux platform, Install directly!

First attach the official website address:

Installation is simple: Execute the following command:

" $ (curl-fssl "

Note include the following in the environment variable:

Export path= "$HOME/.linuxbrew/bin: $PATH" Export path= "$HOME/.linuxbrew/sbin: $PATH"

Now you can enjoy the convenience of brew, encounter problems remember:

Home Doctor


  Using Linuxbrew to install C + + library mysql++ and boost, I found that clion could not invoke these libraries correctly. The reason is that linuxbrew will link these libraries to the address:


However, the path for Clion to find include and Lib by default is:


The workaround is simple, specify the include and LIB paths directly in the CMakeLists.txt file, and add the following two items to the file:

#视实际情况而定include_directories (/home/fit/.linuxbrew/include) link_directories (/home/fit/. LINUXBREW/LIB64)

Remember Reload project!


Using the Package Manager in Ubtuntu Linux-brew

Related Article

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