GCC: Linux gnu/stubs-32.h: No such file or directory

I have Debian / Ubuntu Linux. I need to compile software written in C. The gcc throwing an error that read as follows:

gnu/stubs-32.h: No such file or directory compilation terminated. make: *** [foo.o] Error 1

How do I fix this problem under Debian or Ubuntu Linux 64 bit system and compile apps using gcc compiler?

Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements glibc
Est. reading time N/A
You need 32bit embedded GNU C Library. This incldes development Libraries, header files, contains the symlinks, headers, and object files needed to compile and link programs which use the standard C library.

Fix for Debian Linux

Type the following command:
$ sudo apt-get install libc6-dev

Fix for Ubuntu Linux

Type the following command:
$ sudo apt-get install libc6-dev-i386

Fix for OpenSUSE / Novell Suse Linux (SLES)

Type the following command:
# zypper in glibc-devel-32bit

Fix for RHEL / Fedora / CentOS / Scientific Linux

Type the following yum command to install glibc package:
# yum install glibc-devel.i686

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Shantanu Gadgil Mar 19, 2013 @ 10:44

    What’s embedded about this?
    I just thought of it/them as “32bit development packages” (headers and stuff)


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum