An error occurred while installing gcc-c ++. The original gcc version is in conflict.

Source: Internet
Author: User

An error occurred while installing gcc-c ++. The original gcc version is in conflict.

The following error is reported when gcc-c ++ is installed in CentOS 6.7:

Resolving Dependencies
--> Running transaction check
---> Package gcc-c ++. i686. 4.7-11. el6 will be installed
--> Processing Dependency: libstdc ++-devel = 4.4.7-11. el6 for package: gcc-c ++-4.4.7-11. el6.i686
--> Processing Dependency: gcc = 4.4.7-11. el6 for package: gcc-c ++-4.4.7-11. el6.i686
--> Running transaction check
---> Package gcc-c ++. i686. 4.7-11. el6 will be installed
--> Processing Dependency: gcc = 4.4.7-11. el6 for package: gcc-c ++-4.4.7-11. el6.i686
---> Package libstdc ++-devel. i686. 4.7-11. el6 will be installed
--> Finished Dependency Resolution
Error: Package: gcc-c ++-4.4.7-11. el6.i686 (c6-media)
Requires: gcc = 4.4.7-11. el6
Installed: gcc-4.4.7-16.el6.i686 (@ base)
Gcc = 4.4.4-15. el6
Gcc = 4.4.7-16. el6
Available: gcc-4.4.7-11.el6.i686 (c6-media)
Gcc = 4.4.7-11. el6
Gcc = 4.4.4-15. el6
You cocould try using -- skip-broken to work around the problem
You cocould try running: rpm-Va -- nofiles -- nodigest

Solution: Delete the gcc, cpp, libgomp, and other Dependencies first, and then directly install gcc-c ++, so that it can automatically install the correct version of the dependent gcc, cpp, libgomp:

[Root @ localhost ~] # Yum install gcc-c ++
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* C6-media:
Resolving Dependencies
--> Running transaction check
---> Package gcc-c ++. i686. 4.7-11. el6 will be installed
--> Processing Dependency: libstdc ++-devel = 4.4.7-11. el6 for package: gcc-c ++-4.4.7-11. el6.i686
--> Processing Dependency: gcc = 4.4.7-11. el6 for package: gcc-c ++-4.4.7-11. el6.i686
--> Running transaction check
---> Package gcc. i686. 4.7-11. el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-11. el6 for package: gcc-4.4.7-11.el6.i686
--> Processing Dependency: cpp = 4.4.7-11. el6 for package: gcc-4.4.7-11.el6.i686
--> Processing Dependency: libgomp. so.1 for package: gcc-4.4.7-11.el6.i686
---> Package libstdc ++-devel. i686. 4.7-11. el6 will be installed
--> Running transaction check
---> Package cpp. i686. 4.7-11. el6 will be installed
---> Package libgomp. i686. 4.7-11. el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================== ========================================================== ========================================================== ============================
Package Arch Version Repository Size
========================================================== ========================================================== ========================================================== ============================
Installing:
Gcc-c ++ i686 4.4.7-11. el6 c6-media 4.3 M
Installing for dependencies:
Cpp i686 4.4.7-11. el6 c6-media 3.4 M
Gcc i686 4.4.7-11. el6 c6-media 8.2 M
Libgomp i686 4.4.7-11. el6 c6-media 135 k
Libstdc ++-devel i686 4.4.7-11. el6 c6-media 1.6 M

Transaction Summary
========================================================== ========================================================== ========================================================== ============================
Install 5 Package (s)

Total download size: 18 M
Installed size: 43 M
Is this OK [y/N]: y
Downloading Packages:
Certificate ------------------------------------------------------------------------------------------------------------------------------------------
Total 21 MB/s | 18 MB
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libstdc +++ devel-4.4.7-11.el6.i686 1/5
Installing: cpp-4.4.7-11.el6.i686 2/5
Installing: libgomp-4.4.7-11.el6.i686 3/5
Installing: gcc-4.4.7-11.el6.i686 4/5
Installing: gcc-c ++-4.4.7-11. el6.i686 5/5
Unable to connect to others
Verifying: gcc-c ++-4.4.7-11. el6.i686 1/5
Verifying: libgomp-4.4.7-11.el6.i686 2/5
Verifying: gcc-4.4.7-11.el6.i686 3/5
Verifying: libstdc +++ devel-4.4.7-11.el6.i686 4/5
Verifying: cpp-4.4.7-11.el6.i686 5/5

Installed:
Gcc-c ++. i686. 4.7-11. el6

Dependency Installed:
Cpp. i686 0: 4. 4.7-11. el6 gcc. i686 0: 4. 4.7-11. el6 libgomp. i686 0: 4. 4.7-11. el6 libstdc ++-devel. i686 0: 4. 4.7-11. el6

Complete!
[Root @ localhost ~] #

The gcc-c ++ installation is successful.

Linux GCC 4.8.1 clear and concise tutorial (Ubuntu 12.04 64-bit edition as an example)

Compile and install GCC 4.8.1 + GDB 7.6.1 + Eclipse in CentOS 6.4 and compile and install GCC 4.8.1 + GDB 7.6.1 + Eclipse in CentOS 6.4

Install and use Vim + GCC + GDB in Ubuntu

Switch two GCC versions in Ubuntu

CentOS6.5 upgrade to manually install GCC4.8.2

GCC details: click here
GCC: click here

This article permanently updates the link address:

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.