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

Cuckoo com Vmware Esxi

Cuckoo is an open-source malware analysis platform using sandboxing technology. The tool allows people like us to analyze malicious binaries in an isolated environment. Since Cuckoo is commonly used with Oracle VirtualBox as its virtualization platform, a majority of online documentation is focused on configuration using VirtualBox. PlantainStan and I decided to test running Cuckoo on ESXi and document our success. This guide will help with the basic configuration of ensuring Cuckoo properly interacts with ESXi. We will continue to update this post as we make continue to make an even more baller Cuckoo environment! Note: In order to successfully interact with vSphere's API, you will need the VMWare ESX Standard license. API functionality is required for Cuckoo to work with ESX. Configure ESX Since this guide is not a "how to" on installing ESXi, we will assume that you have successfully installed the hypervisor on your system. There

CentOS7 with Snort Barnyard2 Snorby PulledPork SElinux

This post is about how to install Snort "stack" on CentOS7 with potentially all the latest libs an stuff. Here I will install and configure everything to run Snort as IDS. I will write another post shortly how to run it as IPS - INLINE. System details: [ root@nfsec-ids-01 ~ ] # cat /etc/redhat-release CentOS Linux release 7.3.1611 ( Core ) [ root@nfsec-ids-01 ~ ] # uname -a Linux nfsec-ids-01.nfsec.co.uk 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Snort 2.9.9.0 Installation of snort is very basic: yum install https://www.snort.org/downloads/snort/daq-2.0.6-1.centos7.x86_64.rpm yum install https://www.snort.org/downloads/snort/snort-2.9.9.0-1.centos7.x86_64.rpm Register at Snort and download registered rule set: mkdir /usr/local/src/snortrules cd /usr/local/src/snortrules wget https://www.snort.org/rules/snortrules-snapshot-2990.tar.gz?oinkcode = < oinkcode > tar -zxvf snort