简体   繁体   中英

GCC installation prefix under Linux

What is the recommended installation prefix for GCC under Linux (say default installation of Ubuntu)? Would it be the default /usr/local of just /usr?

I am asking because I ran into a problem similar to this one .

So, is it really a mistake (not recommended) to install GCC to /usr/local

Thanks.

From official gcc instalation documents:

--prefix=dirname
Specify the toplevel installation directory. This is the recommended way to install the tools into a directory other than the default. The toplevel installation directory defaults to /usr/local.

We highly recommend against dirname being the same or a subdirectory of objdir or vice versa. If specifying a directory beneath a user's home directory tree, some shells will not expand dirname correctly if it contains the `~' metacharacter; use $HOME instead.

More at: http://gcc.gnu.org/install/configure.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM