Install the g77 compiler in Linux

Source: Internet
Author: User
Tags gfortran
Nowadays, the compiler is changing rapidly, and accidentally lags behind the times. In the past, many programs were compiled with g77. In the new Linux system, g77 has been completely replaced by gfortran. However, the problem is that gfortran is not fully compatible with g77 in the past, and it is unlikely to complete the modification program .. Helpless, so I had to explore for myself as an amateur. I use Ubuntu10.10 to automatically install the new gcc version (but g77 is no longer available ). I installed g77 using the following method. First

Nowadays, the compiler is changing rapidly, and accidentally lags behind the times.

In the past, many programs were compiled with g77. In the new Linux system, g77 has been completely replaced by gfortran. However, the problem is that gfortran is not fully compatible with g77 in the past, and it is unlikely to complete the modification program .. Helpless, so I had to explore for myself as an amateur.

I usedUbuntu 10.10You can automatically install the new gcc version (but g77 is no longer available ). I installed g77 using the following method.

First, it becomes the root user: sudo bash

1. Add the following source in the/etc/apt/source. list (as root or sudo ):

Deb http://hu.archive.ubuntu.com/ubuntu/ hard universe
Deb-src http://hu.archive.ubuntu.com/ubuntu/ hard universe
Deb http://hu.archive.ubuntu.com/ubuntu/ hard-updates universe
Deb-src http://hu.archive.ubuntu.com/ubuntu/ hard-updates universe

2. Install aptitude
Sudo apt-get install aptitude

3. Run the following command:

Sudo aptitude update
Sudo aptitude install g77

4. Now you can use g77 to compile my original program.

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.