If you are getting an error message saying "GCC: Linux gnu/stubs-32.h: No such file or directory" when you are trying to compile a program on a Linux system, it means that the compiler is unable to find the stubs-32.h
header file, which is required for certain types of 32-bit programs.
This error can occur if the libc6-dev-i386
package, which provides the necessary header files for 32-bit development, is not installed on your system. To fix the error, you can install this package by running the following command:
sudo apt-get install libc6-dev-i386
or
sudo apt install libc6-dev-i386
This will install the libc6-dev-i386
package and the necessary header files, including stubs-32.h
, which should allow you to compile your program without encountering the error.
If you are using a different package manager, such as yum
on CentOS or dnf
on Fedora, you can install the equivalent package for your system. For example, on CentOS you can run the following command:
sudo yum install glibc-devel.i686
and on Fedora you can run the following command:
sudo dnf install glibc-devel.i686