How to fix my /usr/include dir?[SOLVED]

New to Debian (Or Linux in general)? Ask your questions here!

How to fix my /usr/include dir?[SOLVED]

Postby fredcrs » 2010-02-09 01:16

OK I did it
I was trying to make my webcam work and I just deleted some .h in my /usr/include , especially(dont ask me how) dir
now I am trying to compile some of my C programas and getting lots of errors.

Code: Select all
from /usr/include/sys/socket.h:36,
                 from /usr/include/netinet/in.h:25,
                 from /usr/include/arpa/inet.h:23,

like those.
Ok I am really stupid hehe, but now is there a way I can fix this??
I have another problem because I can't reinstall the linux-headers because the repository is offline. and I dont have the deb.
But I do have the source and the headers on my /usr/src

oh, I am using Lenny but using kernel 2.6.30-1-amd64
thanks in advance
Last edited by fredcrs on 2010-02-09 12:01, edited 1 time in total.
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55

Re: How to fix my /usr/include dir?

Postby smallchange » 2010-02-09 01:55

You can find out which packages you need using dpkg -S
Code: Select all
dpkg -S /usr/include/netinet/in.h

If you are lucky the packages will still be in /var/cache/apt/archives and
Code: Select all
aptitude reinstall libc6-dev
will fix it for you. If not you will need to download them and get them to your computer with a cd or thumb drive or something.
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: How to fix my /usr/include dir?

Postby fredcrs » 2010-02-09 10:21

I tryed to install a new kernel with new headers, surce, and image but it didnt work
will try your advice just now
but before I try should I do it with the sid repository? or lenny?
I am using a sid kernel in lenny because of the support to some devices
thanks

ah and the problem of the offline repository was the kernel buildserver, and I think its not coming back so I am using sid repo
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55

Re: How to fix my /usr/include dir?

Postby fredcrs » 2010-02-09 10:25

aptitude reinstall libc6-dev didnt work
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55

Re: How to fix my /usr/include dir?

Postby fredcrs » 2010-02-09 10:31

aptitude install libc6-dev
tells me
ia32-libs [2.7 (stable, now) -> 20090808 (unstable)]
ia32-libs-gtk [2.7 (stable, now) -> 20090804 (unstable)]
lib32asound2 [1.0.16-2 (stable, now) -> 1.0.21a-1 (unstable)]
lib32gcc1 [1:4.3.2-1.1 (stable, now) -> 1:4.4.3-2 (unstable)]
lib32ncurses5 [5.7+20081213-1 (stable, now) -> 5.7+20090803-2 (unstable)]
lib32stdc++6 [4.3.2-1.1 (stable, now) -> 4.4.3-2 (unstable)]
lib32z1 [1:1.2.3.3.dfsg-12 (stable, now) -> 1:1.2.3.4.dfsg-3 (unstable)]
libasound2 [1.0.16-2 (stable, now) -> 1.0.21a-1 (unstable)]
libc6-i386 [2.7-18lenny2 (stable, now) -> 2.10.2-6 (unstable)]
locales [2.7-18lenny2 (stable, now) -> 2.10.2-6 (unstable)]

do this?? on lenny?
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55

Re: How to fix my /usr/include dir?

Postby fredcrs » 2010-02-09 10:38

ok that fixed for me, thanks very much!! I purged and installed libc6-dev and build-essential (using sid repo, on my lenny)
but I have a hard doubt:
Do I have to be using libc6-dev and build-essential from sid, since I am using a sid kernel, on my lenny ?? 2.6.32-2-amd64

(I also read that when compiling a module I have to do with the same gcc version my kernel was bought so I think I should be using libc6-dev and build-essential from sid even on my lenny distro?)
Also,
Thanks veyr much for the help
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55

Re: How to fix my /usr/include dir?

Postby Jackiebrown » 2010-02-09 11:58

If you update libc6 to sid, you may as well as update the whole system since everything is lenny is built against the lenny libc6
User avatar
Jackiebrown
 
Posts: 1276
Joined: 2007-01-02 04:46
Location: San Antonio, TX

Re: How to fix my /usr/include dir?

Postby fredcrs » 2010-02-09 12:01

ok thank you very much
fredcrs
 
Posts: 15
Joined: 2010-01-12 00:55


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 21 guests

fashionable