"Pro-Test" <g++/gcc>centos under g++: Command not found problem Resolution (C + + environment installation)

Source: Internet
Author: User

g++ under CentOS: Command not found problem resolutionFebruary 27, 2017 18:09:06 read: 5174 Tags: centosgcc more Personal classification: Problem AnalysisCopyright NOTICE: This article is the author's hard writing results, if need to reprint, please contact the author, and retain the author information and the original link, thank you ~ ~ 58173190

1. The question was raised

During the installation of Extundelete, it was found that during the configure process, there was an error, and the specific error message was as follows:

  1. configure:2865:g++--version >&5
  2. ./configure:line 2867:g++: Command not found
  3. configure:2876: $? = 127
  4. configure:2865:g++-V >&5
  5. ./configure:line 2867:g++: Command not found
  6. configure:2876: $? = 127
  7. configure:2865:g++-V >&5
  8. ./configure:line 2867:g++: Command not found
  9. configure:2876: $? = 127
  10. configure:2865:g++-qversion >&5
  11. ./configure:line 2867:g++: Command not found
  12. configure:2876: $? = 127
  13. Configure:2896:checking whether the C + + compiler works
  14. configure:2918:g++ Conftest.cpp >&5
  15. ./configure:line 2920:g++: Command not found
  16. configure:2922: $? = 127
  17. Configure:2960:result:no
  18. Configure:failed program was:
  19. | /* Confdefs.h */
  20. | #define PACKAGE_NAME "Extundelete"
  21. | #define PACKAGE_TARNAME "Extundelete"
  22. | #define Package_version "0.2.4"
  23. | #define Package_string "Extundelete 0.2.4"
  24. | #define Package_bugreport "Extundelete.sourceforge.net"
  25. | #define PACKAGE_URL ""
  26. | #define PACKAGE "Extundelete"
  27. | #define VERSION "0.2.4"
  28. | /* End confdefs.h. */
  29. |
  30. | Int
  31. | Main ()
  32. | {
  33. |
  34. | ;
  35. | return 0;
  36. | }
  37. Configure:2965:error:in '/root/extundelete-0.2.4 ':
  38. configure:2967:error:c++ compiler cannot create executables
  39. See ' Config.log ' for more details

After analysis, it is found that the key error messages are:

 g++: command not found
g++ immediately to the brain to complement the gc++ compiler is not installed AH? Estimate yes, retrace, install look.

2. Installation and resolution

Because I am using the OS environment for CentOS, the default package management tool is Yum, so follow the dependency package:

    1. YUM-Y Update gcc
    2. Yum-y Install gcc+ gcc-c++
After executing the above command, you can return to the GCC related commands in accordance with the success, so the problem is resolved.

3. Summary analysis

By default, CentOS does not follow the GCC-related compilation commands, and if, at the time of installing the software, it is sometimes necessary to install it from source code compilation, then GCC command support is required.

"Pro-Test" <g++/gcc>centos under g++: Command not found problem Resolution (C + + environment installation)

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