Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm building 32 bit boost thread libraries on 32 bit Ubuntu 12.10. When building I get the error /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

I googled the problem and from reading this question it seems I need to install libc6-dev-i386. However, when I run sudo apt-get install libc6-dev-i386 I get:

Package libc6-dev-i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libc6-dev-i386' has no installation candidate

Can anyone help me to locate this package?

Edit, more info:

I'm not sure if this is relevant, but uname -m -p -i gives i686 i686 i686.

ls /usr/include/gnu/ gives libc-version.h lib-names.h option-groups.h stubs-64.h stubs.h.

ls /usr/include/i386-linux-gnu/gnu gives libc-version.h lib-names.h option-groups.h stubs-32.h stubs.h.

I added /usr/include/i386-linux-gnu to $PATH but it didn't help, I still get the same error when trying to build the 32 bit boost thread libraries.

More info:

I've now tried this with Ubuntu 12.04 and I'm getting exactly the same behaviour. With this install uname -i gives i386.

share|improve this question
    
Here I can install it without any problems. Did you try sudo apt-get update before? –  guntbert Jan 22 '13 at 21:27
    
@guntbert, yes, I've done an apt-get update already. –  eoinmullan Jan 23 '13 at 8:23
    
try with sudo apt-get install libc6-dev libc6-dev-i386 –  Dumindu Mahawela Jul 8 at 11:16
    
possible duplicate of What does Package <package> has no installation candidate mean? –  Pandya Sep 20 at 13:52

1 Answer 1

This may not be the proper solution but it will download the package for you.

Type "software sources" in the dash, and change your server to "Main server". This is because some (one of which may be yours) do not maintain the package on their servers. Refer to the image below showing the source changed to "Main server". Then do a sudo apt-get update and then sudo apt-get install libc6-dev-i386. Repeating, this is not the proper solution, but will probably download the package for you.

software sources

share|improve this answer
    
Thanks, Jobin. I tried this but unfortunately I'm still getting the same result. –  eoinmullan Jan 23 '13 at 14:48
    
Are you sure you did a sudo apt-get update after changing the source? –  i08in Jan 23 '13 at 15:59
    
Yes, I did the update. –  eoinmullan Jan 23 '13 at 22:12
    
I think, as I'm on a 32 bit OS, that I shouldn't need libc6-dev-i386. I guess the question is then why can the compiler not find stubs-32.h. I've found that if I copy stubs-32.h from /usr/include/i386-linux-gnu/gnu to '/usr/include/gnu` then I can compile the boost thread libraries without a problem. I'd still like to understand why I need to copy that file though? –  eoinmullan Jan 23 '13 at 22:17
1  
I figure libc6-dev-i386 is to allow you to compile for 32 bit on a 64 bit machine. That's why I figure I shouldn't need it. Yeah, I guess I could equally have had gcc search in usr/include/i386-linux-gnu/gnu, I expect that would have worked too. But I'd like to understand why stubs-32.h was not in /usr/include/gnu but stubs-64.h was. –  eoinmullan Jan 24 '13 at 19:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.