Software⏱️ 3 min read📅 2026-06-15

How to Fix: Ubuntu GCC Version error in libgfortran

Ubuntu GCC Version error in libgfortran fix

Quick Answer: Try updating R to the latest version or reinstalling it with a newer GCC version.

The error message indicates that the GCC version 4.3.0 is required by the libgfortran.so.3 library, but it's not found. This issue affects users who have updated their R package using apt-get update and upgrade on Ubuntu 16.04.2 LTS.

This error can be frustrating for developers who rely on R for data analysis and scientific computing tasks. Fortunately, there are several methods to resolve this issue.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the libgfortran.so.3 library requires a specific version of GCC (GCC_4.3.0) which is no longer available in newer versions of Ubuntu. This is because Ubuntu has moved away from GCC 4.x and now uses GCC 5.x as the default compiler.
  • Another possible reason for this error could be that the libgfortran.so.3 library was installed using a package manager other than apt-get, which may not have been updated to reflect the newer version of GCC.

🔧 Proven Troubleshooting Steps

Update R to use the latest GCC version

  1. Step 1: Open the terminal and run the command `sudo apt-get update` to ensure that the package list is up-to-date.
  2. Step 2: Run the command `sudo apt-get install r-base` to upgrade R to the latest version, which should include a newer version of GCC.
  3. Step 3: After installing the latest version of R, try running R again to see if the error persists.

Install libgfortran-dev package manually

  1. Step 1: Run the command `sudo apt-get install libgfortran-dev` to install the libgfortran-dev package manually.
  2. Step 2: After installing the package, try running R again to see if the error persists.

🎯 Final Words

If the above methods do not resolve the issue, it may be necessary to downgrade R to a version that is compatible with GCC 4.3.0. However, this should only be done as a last resort and after careful consideration of the potential risks involved.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions