how to update make 3.81 linux

后端 未结 1 928
失恋的感觉
失恋的感觉 2021-02-05 17:51

I am new to Linux (new as in installed it yesterday), I need it for my programming course in the university and I\'ve been told to install specific versions of specific programs

相关标签:
1条回答
  • 2021-02-05 18:36

    Due to a long-standing unresolved Debian bug report, GNU Make remained the age-old 3.81 in Debian for a very long time, and as a consequence, in Debian-based distributions such as Ubuntu and Mint.

    The latest Debian release, Jessie, has upgraded to 4.0, so Debian-based distributions will have that upgrade. However, it is better to use 4.1.

    This has been discussed many times on the GNU Make mailing list and elsewhere.

    So to get a newer version, you must compile it from scratch. This is easy:

    1. Install the required packages (gcc, make and such).
    2. Open up a shell (if you're using the GUI, a terminal window).
    3. Type the following commands (or something equivalent, e.g. you can use curl instead of wget):

      cd /tmp
      wget http://ftp.gnu.org/gnu/make/make-4.1.tar.gz
      tar xvf make-4.1.tar.gz
      cd make-4.1/
      ./configure
      make
      sudo make install
      cd ..
      rm -rf make-4.1.tar.gz make-4.1
      

    Now, make 4.1 is in /usr/local/bin/make.

    You can verify it is there with whereis make.

    You can make it your default make by prefixing /usr/local/bin to your $PATH variable in your shell startup file; for instance, in .profile or .bashrc if you use the bash shell.

    Don't try to install a self-compiled make (or anything else that doesn't come from the distribution's package manager) into /bin or /usr/bin; doing that will confuse your package manager.

    0 讨论(0)
提交回复
热议问题