In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to install gcc under Linux" related knowledge, editor through the actual case to show you the operation process, the method of operation is simple and fast, practical, I hope that this "how to install gcc under Linux" article can help you solve the problem.
GCC, which is a set of programming language compiler developed by GNU, is the most commonly used compiler under Linux. It is presented in the form of gcc command.
Source code installation take gcc installation as an example, log in to https://gcc.gnu.org/, download the desired version of the gcc installation package, upload gcc-4.1.2.tar.gz to any directory of the Linux server, extract the directory and execute the shell command
. / configuration extract the directory and execute the shell command
The advantage of make install is that the installation directory, software version and so on can be configured at will. The same installation package can be installed in any version of Linux. The disadvantage is that the threshold of installation is high, the configuration is complex, and different software configuration projects are different. Installation is prone to failure. Successful installation will sometimes damage the original system.
Common command parameters for rpm package installation view rpm-qa
Install rpm-ivh package name
Uninstall rpm-e package name
Download rpm http://rpm.pbone.net/ is a website that searches for rpm packages, find it in the search box
Search results appear
Click the first result to enter the details interface, and you can see the details of the rpm package, including dependencies and contents of the package.
The advantage is that there is no need for configuration during installation, and you can choose a version.
The disadvantage is that the dependency of the installation package needs to be maintained manually, installation A finds dependence on B, installation B finds dependence on C. It's a test of patience.
Install gdb as an example to determine the dependency gcc-> gdb,gdb +-> dependency gcc
Gcc installs the following packages sequentially
Rpm-ivh cpp-4.1.2-42.el5.i386.rpm rpm-ivh kernel-headers-2.6.18-92.el5.i386.rpm rpm-ivh glibc-headers-2.5-24.i386.rpm rpm-ivh glibc-devel-2.5-24.i386.rpm rpm-ivh libgomp-4.1.2-42.el5.i386.rpm rpm-ivh gcc-4.1.2-42.el5.i386.rpmginstalled + sequentially installs the following packages
Rpm-ivh libstdc++-devel-4.1.2-48.el5.i386.rpm rpm-ivh gcc-c++-4.1.2-48.el5.i386.rpmgdb installs the following packages sequentially
The installation is not complete until rpm-ivh gdb-7.0.1-23.el5.i386.rpm installs the dazzling packages above in sequence.
The rpm package naming convention gcc-c++-4.1.2-48.el5.i386.rpm is named name-version-arch (.src) .rpm according to the following format
Name: package name version: package version with primary, secondary and revision arch: publisher version, fc, el, mga, tr... Hardware platform, hardware platform includes: i386, i486, i586, i686, x86x64, ppc, sparc, alpha src: source code package
YUM is based on RPM package management, can automatically download and install RPM packages from specified servers, automatically handle dependency relationships, and install all dependent software at once.
The advantage of yum install gdb is that it automatically manages dependencies. The disadvantage is that you need to connect to the public network and install the latest version on the specified server.
Apt-getapt-get is a linux command for deb package-managed operating systems. It is mainly used to automatically search, install, upgrade, and uninstall software or operating systems from Internet software repositories.
This is the end of apt-get install gdb's introduction to "how to install gcc under Linux". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.