Pular para o conteúdo principal

x86_64 Linux Error: gnu/stub-32.h Missing Error and Solution


I‘m getting the following error while compiling application under CentOS / RHEL / Fedora Linux 64 bit edition:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h:
No such file or directory
How do I fix this error and compile my applications using gcc under RHEL / Fedora / CentOS Linux 64bit system?

You need to install the glibc-devel package. It contains the object files necessary for developing programs which use the standard C libraries (which are used by nearly all programs). If you are developing programs which will use the standard C libraries, your system needs to have these standard object files available in order to create the executables.
Install glibc-devel if you are going to develop programs which will use the standard C libraries.

Fix for the RHEL/CentOS 5.x for GCC gnu/stub-32.h missing error

Type the following yum command:
# yum -y install glibc-devel.i386

Fix for the RHEL/CentOS 6.x for GCC gnu/stub-32.h missing error

Type the following yum command:
# yum -y install glibc-devel.i686 glibc-devel
Sample outputs:
Loaded plugins: product-id, protectbase, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
ksplice-uptrack                                          |  951 B     00:00     
rhel-x86_64-server-6                                     | 1.5 kB     00:00     
rhel-x86_64-server-6-debuginfo                           | 1.3 kB     00:00     
rhel-x86_64-server-optional-6                            | 1.5 kB     00:00     
rhel-x86_64-server-optional-6-debuginfo                  | 1.3 kB     00:00     
rhel-x86_64-server-supplementary-6                       | 1.5 kB     00:00     
rhel-x86_64-server-supplementary-6-debuginfo             | 1.3 kB     00:00     
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package glibc-devel.i686 0:2.12-1.107.el6 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.107.el6 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_hesiod.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libcidn.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_nis.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libBrokenLocale.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libanl.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_files.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libthread_db.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_compat.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_dns.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnss_nisplus.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libutil.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libnsl.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libdl.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: librt.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libresolv.so.2 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libcrypt.so.1 for package: glibc-devel-2.12-1.107.el6.i686
--> Processing Dependency: libm.so.6 for package: glibc-devel-2.12-1.107.el6.i686
--> Running transaction check
---> Package glibc.i686 0:2.12-1.107.el6 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.107.el6.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.107.el6.i686
---> Package glibc-headers.x86_64 0:2.12-1.107.el6 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.107.el6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.107.el6.x86_64
--> Running transaction check
---> Package kernel-headers.x86_64 0:2.6.32-358.2.1.el6 will be installed
---> Package nss-softokn-freebl.i686 0:3.12.9-11.el6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package             Arch    Version                Repository             Size
================================================================================
Installing:
 glibc-devel         i686    2.12-1.107.el6         rhel-x86_64-server-6  974 k
Installing for dependencies:
 glibc               i686    2.12-1.107.el6         rhel-x86_64-server-6  4.3 M
 glibc-headers       x86_64  2.12-1.107.el6         rhel-x86_64-server-6  604 k
 kernel-headers      x86_64  2.6.32-358.2.1.el6     rhel-x86_64-server-6  2.3 M
 nss-softokn-freebl  i686    3.12.9-11.el6          rhel-x86_64-server-6  116 k
 
Transaction Summary
================================================================================
Install       5 Package(s)
 
Total download size: 8.3 M
Installed size: 0  
Downloading Packages:
(1/5): glibc-2.12-1.107.el6.i686.rpm                     | 4.3 MB     00:00     
(2/5): glibc-devel-2.12-1.107.el6.i686.rpm               | 974 kB     00:00     
(3/5): glibc-headers-2.12-1.107.el6.x86_64.rpm           | 604 kB     00:00     
(4/5): kernel-headers-2.6.32-358.2.1.el6.x86_64.rpm      | 2.3 MB     00:00     
(5/5): nss-softokn-freebl-3.12.9-11.el6.i686.rpm         | 116 kB     00:00     
--------------------------------------------------------------------------------
Total                                           5.8 MB/s | 8.3 MB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : kernel-headers-2.6.32-358.2.1.el6.x86_64                     1/5 
  Installing : nss-softokn-freebl-3.12.9-11.el6.i686                        2/5 
  Installing : glibc-2.12-1.107.el6.i686                                    3/5 
  Installing : glibc-headers-2.12-1.107.el6.x86_64                          4/5 
  Installing : glibc-devel-2.12-1.107.el6.i686                              5/5 
  Verifying  : glibc-2.12-1.107.el6.i686                                    1/5 
  Verifying  : glibc-devel-2.12-1.107.el6.i686                              2/5 
  Verifying  : nss-softokn-freebl-3.12.9-11.el6.i686                        3/5 
  Verifying  : glibc-headers-2.12-1.107.el6.x86_64                          4/5 
  Verifying  : kernel-headers-2.6.32-358.2.1.el6.x86_64                     5/5 
 
Installed:
  glibc-devel.i686 0:2.12-1.107.el6                                             
 
Dependency Installed:
  glibc.i686 0:2.12-1.107.el6                                                   
  glibc-headers.x86_64 0:2.12-1.107.el6                                         
  kernel-headers.x86_64 0:2.6.32-358.2.1.el6                                    
  nss-softokn-freebl.i686 0:3.12.9-11.el6                                       
 
Complete!

Fix for Debian/Ubuntu Linux for GCC gnu/stub-32.h missing error

Type the following apt-get command to fix on a Debian or Ubuntu Linux:
$ sudo apt-get install g++-multilib libc6-dev-i386
Now, try gcc or make command again to recompile your application.

Comentários

Postagens mais visitadas deste blog

Upgrading Iomega ix2-200 to Cloud Edition

You just got your ix2-200 from eBay and there are no disks inside the NAS. Or you have a brand new ix2-200 -yet you could not afford Cloud Edition. No problem. With just a USB stick and a SATA adapter or desktop PC, you will easily upgrade your ix2-200 to ix2-200 Cloud Edition. Not only your ix2-200 will have a brand new interface and Cloud options, but also will become Mac OS X Lion compatible! What do we need? Decrypted! ix2-200 Cloud Edition Firmware 3.1.12.47838 S endSpace or RapidShare * USB Flash Drive with at least 2 GB capacity and LED indicator** SATA to USB adapter or desktop PC Toothpick or paperclip Preparing Hard Drives Preparing hard drives is the first step because you have to wipe all the data inside the hard drives and make them just like brand new. We used 2 x Seagate 2 TB 5900 RPM Drives. Backup any files if you have and then remove both disks from ix2-200 and attach them to SATA to USB adapter or your desktop PC's SATA port. Using ...

How to Fix sub-process /usr/bin/dpkg returned an error code (1)

Introduction The error message “Sub-process /usr/bin/dpkg returned an error code (1)” indicates a problem with the package installer. This can happen in Ubuntu after a failed software installation, or if the installer becomes corrupted. The key phrase in this error is /usr/bin/dpkg. This refers to the dpkg package installer for Linux. A package installer is an application that tracks software, updates, and dependencies. If it is damaged, any new software installation will cause this error message. We cover several possible solutions, from easily-solved and straightforward solutions to more complex processes. This guide will help you resolve the dpkg returned an error code 1 on an Ubuntu operating system. Prerequisites A user account with sudo privileges A terminal window/command-line ( Ctrl - Alt - T ) Options to Fix sub-process /usr/bin/dpkg returned an error code (1) Method 1: Reconfigure dpkg Database ...

Installing and Configuring Snorby on CentOS 7

Snorby is a ruby on rails web application for network security monitoring that interfaces with current popular intrusion detection systems (Snort, Suricata and Sagan). The basic fundamental concepts behind Snorby are simplicity, organization and power. The project goal is to create a free, open source and highly competitive application for network monitoring for both private and enterprise use. Set up your system with the follow script to ensure that nothing will be missing http://wiki.douglasqsantos.com.br/doku.php/confinicialcentos7_en The Snorby will use the follow ip: 192.168.1.251 Let's install the development tools yum groupinstall "Development Tools" -y Let's install the dependencies for Snorby. yum install openssl-devel readline-devel libxml2-devel libxslt-devel mariadb mariadb-devel mariadb-server urw-fonts libX11-devel libXext-devel git \ fontconfig-devel libXrender-devel unzip wget xorg-x11-server-Xvfb libyaml libyaml-devel gdbm-de...