Lập Trình Linux

Install GCC From Source Code

Install success on ubuntu 19.4 with GCC 9.2
Step 1: sudo apt update
Step 2: sudo apt upgrade
Step 3: sudo apt-get install build-essential
Step 4: download and extract GCC
Step 5: contrib/download_prerequisites
Step 6: ./configure -v –build=x86_64-linux-gnu –host=x86_64-linux-gnu –target=x86_64-linux-gnu –enable-checking=release –enable-languages=c,c++ –disable-multilib
Step 7: make -j 4
make (if make -j 4 error)
Let trying a few again (Step 1 to Step 7)
Waiting about 1 hour
Step 8: sudo make install
Gcc site :
References :


Xem Thêm Bài Viết Khác:https://ftlinuxcourse.com/lap-trinh-linux

Phần Mềm
Hướng dẫn cách cài đặt và sử dụng Teamviewer trên máy tính [cực hay]
Máy Tính
Hướng dẫn lựa chọn SSD cho máy tính của bạn – Minhvu.vn
Lập Trình Linux
15 Things To Do First in Linux Mint
  • You configured GCC at the same directory?! why? mostly, we hope to install alternative GCC in separate directory. You replace the default compiler by the one installed.

  • Thanks, big help with dealing with MATLAB and having to compile c/c++ code using mex.

  • grate job

  • Unfortunately, there was an error after Step 7. https://pastebin.com/XPLPhpi6

    Will try step 7 again.
    Edit: Tried it again, was much faster this time and ended in an error again.

    make[1]: * [stage1-bubble] Error 2
    make[1]: Leaving directory '/mnt/c/Users/Tom/Downloads/gcc/gcc-9.1.0'
    Makefile:1001: recipe for target 'all' failed
    make: * [all] Error 2

  • Sir but it shows an error…

  • thanks a lot it worked

  • thank you man <3 …

  • thank you man

  • listen its showing an error by name of ERROR 2 and showing all failed………… so now what i do please tell

  • Really helpful.

  • LOX