Can't install linux-libc-dev in Ubuntu on Windows
up vote
4
down vote
favorite
I'm trying to install linux-libc-dev with apt-get in Windows Subsystem for Linux (ubuntu), but I get an error and I can't seem to resolve it:
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb (--unpack):
unable to install new version of `/usr/include/linux/netfilter/xt_DSCP.h': File exists
Errors were encountered while processing:
/var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
But when I list the files in /usr/include/, the linux directory doesn't even exist.
What could be causing this? How can the file exist when the directory does not?
Thanks.
linux ubuntu windows-10 windows-subsystem-for-linux apt
add a comment |
up vote
4
down vote
favorite
I'm trying to install linux-libc-dev with apt-get in Windows Subsystem for Linux (ubuntu), but I get an error and I can't seem to resolve it:
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb (--unpack):
unable to install new version of `/usr/include/linux/netfilter/xt_DSCP.h': File exists
Errors were encountered while processing:
/var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
But when I list the files in /usr/include/, the linux directory doesn't even exist.
What could be causing this? How can the file exist when the directory does not?
Thanks.
linux ubuntu windows-10 windows-subsystem-for-linux apt
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
Unfortunately no.
– Peter
Aug 15 '17 at 15:35
add a comment |
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I'm trying to install linux-libc-dev with apt-get in Windows Subsystem for Linux (ubuntu), but I get an error and I can't seem to resolve it:
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb (--unpack):
unable to install new version of `/usr/include/linux/netfilter/xt_DSCP.h': File exists
Errors were encountered while processing:
/var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
But when I list the files in /usr/include/, the linux directory doesn't even exist.
What could be causing this? How can the file exist when the directory does not?
Thanks.
linux ubuntu windows-10 windows-subsystem-for-linux apt
I'm trying to install linux-libc-dev with apt-get in Windows Subsystem for Linux (ubuntu), but I get an error and I can't seem to resolve it:
dpkg: error processing archive /var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb (--unpack):
unable to install new version of `/usr/include/linux/netfilter/xt_DSCP.h': File exists
Errors were encountered while processing:
/var/cache/apt/archives/linux-libc-dev_3.13.0-126.175_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
But when I list the files in /usr/include/, the linux directory doesn't even exist.
What could be causing this? How can the file exist when the directory does not?
Thanks.
linux ubuntu windows-10 windows-subsystem-for-linux apt
linux ubuntu windows-10 windows-subsystem-for-linux apt
asked Aug 8 '17 at 18:21
Peter
1377
1377
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
Unfortunately no.
– Peter
Aug 15 '17 at 15:35
add a comment |
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
Unfortunately no.
– Peter
Aug 15 '17 at 15:35
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
Unfortunately no.
– Peter
Aug 15 '17 at 15:35
Unfortunately no.
– Peter
Aug 15 '17 at 15:35
add a comment |
2 Answers
2
active
oldest
votes
up vote
3
down vote
accepted
Probably an install was aborted mid way, leaving it broken.
Find borked packages:
dpkg --configure -a
This should return a list like:
Errors were encountered while processing:
libc6-dev:amd64
libstdc++-4.8-dev:amd64
g++-4.8
g++
Force remove these:
dpkg --remove libc6-dev
dpkg --remove g++
...
Clear your cache of any downloaded packages which are invalid, and purge extra packages:
apt-get clean
apt-get autoremove
You should be able to apt-get install foo
again now.
As far as I'm aware apt
isn't smart enough to fix this itself once it gets into this kind of state, you have to fall back to explicitly purging packages using dpkg --remove
.
add a comment |
up vote
0
down vote
I had the same problem and found that it is triggered simply because, for some unfortunate and weird reason, the Ubuntu package linux-libc-dev
contains a handful of (header) files with names that are distinct only by letter case, e.g., /usr/include/linux/netfilter/xt_DSCP.h
and /usr/include/linuxnetfilter/xt_dscp.h
.
The issue is due to some silly behavior of the WSL, namely a bug/inconsistency how its case-sensitive file system is implemented. Suppose in some directory there is a file and you want to create in the same directory a further file with a name that is the same except for case. This should work and create the second file in addition to the other one (or maybe overwrite the existing file). Yet this fails and, even worse, produces a misleading error:
touch a.txt
touch A.txt
yields
touch: cannot touch 'A.txt': Input/output error
On the other hand, one can produce files with both cases in this way:
touch b.txt
touch x.txt
mv x.txt B.txt
ls {b,B}.txt
yields
b.txt B.txt
Here is a workaround for packages with names like linux-libc-dev_4.4.0-97.120_amd64.deb
:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev*deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter/xt_DSCP.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev*.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev*.deb
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
Probably an install was aborted mid way, leaving it broken.
Find borked packages:
dpkg --configure -a
This should return a list like:
Errors were encountered while processing:
libc6-dev:amd64
libstdc++-4.8-dev:amd64
g++-4.8
g++
Force remove these:
dpkg --remove libc6-dev
dpkg --remove g++
...
Clear your cache of any downloaded packages which are invalid, and purge extra packages:
apt-get clean
apt-get autoremove
You should be able to apt-get install foo
again now.
As far as I'm aware apt
isn't smart enough to fix this itself once it gets into this kind of state, you have to fall back to explicitly purging packages using dpkg --remove
.
add a comment |
up vote
3
down vote
accepted
Probably an install was aborted mid way, leaving it broken.
Find borked packages:
dpkg --configure -a
This should return a list like:
Errors were encountered while processing:
libc6-dev:amd64
libstdc++-4.8-dev:amd64
g++-4.8
g++
Force remove these:
dpkg --remove libc6-dev
dpkg --remove g++
...
Clear your cache of any downloaded packages which are invalid, and purge extra packages:
apt-get clean
apt-get autoremove
You should be able to apt-get install foo
again now.
As far as I'm aware apt
isn't smart enough to fix this itself once it gets into this kind of state, you have to fall back to explicitly purging packages using dpkg --remove
.
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
Probably an install was aborted mid way, leaving it broken.
Find borked packages:
dpkg --configure -a
This should return a list like:
Errors were encountered while processing:
libc6-dev:amd64
libstdc++-4.8-dev:amd64
g++-4.8
g++
Force remove these:
dpkg --remove libc6-dev
dpkg --remove g++
...
Clear your cache of any downloaded packages which are invalid, and purge extra packages:
apt-get clean
apt-get autoremove
You should be able to apt-get install foo
again now.
As far as I'm aware apt
isn't smart enough to fix this itself once it gets into this kind of state, you have to fall back to explicitly purging packages using dpkg --remove
.
Probably an install was aborted mid way, leaving it broken.
Find borked packages:
dpkg --configure -a
This should return a list like:
Errors were encountered while processing:
libc6-dev:amd64
libstdc++-4.8-dev:amd64
g++-4.8
g++
Force remove these:
dpkg --remove libc6-dev
dpkg --remove g++
...
Clear your cache of any downloaded packages which are invalid, and purge extra packages:
apt-get clean
apt-get autoremove
You should be able to apt-get install foo
again now.
As far as I'm aware apt
isn't smart enough to fix this itself once it gets into this kind of state, you have to fall back to explicitly purging packages using dpkg --remove
.
answered Oct 23 '17 at 1:10
Doug
313138
313138
add a comment |
add a comment |
up vote
0
down vote
I had the same problem and found that it is triggered simply because, for some unfortunate and weird reason, the Ubuntu package linux-libc-dev
contains a handful of (header) files with names that are distinct only by letter case, e.g., /usr/include/linux/netfilter/xt_DSCP.h
and /usr/include/linuxnetfilter/xt_dscp.h
.
The issue is due to some silly behavior of the WSL, namely a bug/inconsistency how its case-sensitive file system is implemented. Suppose in some directory there is a file and you want to create in the same directory a further file with a name that is the same except for case. This should work and create the second file in addition to the other one (or maybe overwrite the existing file). Yet this fails and, even worse, produces a misleading error:
touch a.txt
touch A.txt
yields
touch: cannot touch 'A.txt': Input/output error
On the other hand, one can produce files with both cases in this way:
touch b.txt
touch x.txt
mv x.txt B.txt
ls {b,B}.txt
yields
b.txt B.txt
Here is a workaround for packages with names like linux-libc-dev_4.4.0-97.120_amd64.deb
:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev*deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter/xt_DSCP.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev*.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev*.deb
add a comment |
up vote
0
down vote
I had the same problem and found that it is triggered simply because, for some unfortunate and weird reason, the Ubuntu package linux-libc-dev
contains a handful of (header) files with names that are distinct only by letter case, e.g., /usr/include/linux/netfilter/xt_DSCP.h
and /usr/include/linuxnetfilter/xt_dscp.h
.
The issue is due to some silly behavior of the WSL, namely a bug/inconsistency how its case-sensitive file system is implemented. Suppose in some directory there is a file and you want to create in the same directory a further file with a name that is the same except for case. This should work and create the second file in addition to the other one (or maybe overwrite the existing file). Yet this fails and, even worse, produces a misleading error:
touch a.txt
touch A.txt
yields
touch: cannot touch 'A.txt': Input/output error
On the other hand, one can produce files with both cases in this way:
touch b.txt
touch x.txt
mv x.txt B.txt
ls {b,B}.txt
yields
b.txt B.txt
Here is a workaround for packages with names like linux-libc-dev_4.4.0-97.120_amd64.deb
:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev*deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter/xt_DSCP.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev*.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev*.deb
add a comment |
up vote
0
down vote
up vote
0
down vote
I had the same problem and found that it is triggered simply because, for some unfortunate and weird reason, the Ubuntu package linux-libc-dev
contains a handful of (header) files with names that are distinct only by letter case, e.g., /usr/include/linux/netfilter/xt_DSCP.h
and /usr/include/linuxnetfilter/xt_dscp.h
.
The issue is due to some silly behavior of the WSL, namely a bug/inconsistency how its case-sensitive file system is implemented. Suppose in some directory there is a file and you want to create in the same directory a further file with a name that is the same except for case. This should work and create the second file in addition to the other one (or maybe overwrite the existing file). Yet this fails and, even worse, produces a misleading error:
touch a.txt
touch A.txt
yields
touch: cannot touch 'A.txt': Input/output error
On the other hand, one can produce files with both cases in this way:
touch b.txt
touch x.txt
mv x.txt B.txt
ls {b,B}.txt
yields
b.txt B.txt
Here is a workaround for packages with names like linux-libc-dev_4.4.0-97.120_amd64.deb
:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev*deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter/xt_DSCP.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev*.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev*.deb
I had the same problem and found that it is triggered simply because, for some unfortunate and weird reason, the Ubuntu package linux-libc-dev
contains a handful of (header) files with names that are distinct only by letter case, e.g., /usr/include/linux/netfilter/xt_DSCP.h
and /usr/include/linuxnetfilter/xt_dscp.h
.
The issue is due to some silly behavior of the WSL, namely a bug/inconsistency how its case-sensitive file system is implemented. Suppose in some directory there is a file and you want to create in the same directory a further file with a name that is the same except for case. This should work and create the second file in addition to the other one (or maybe overwrite the existing file). Yet this fails and, even worse, produces a misleading error:
touch a.txt
touch A.txt
yields
touch: cannot touch 'A.txt': Input/output error
On the other hand, one can produce files with both cases in this way:
touch b.txt
touch x.txt
mv x.txt B.txt
ls {b,B}.txt
yields
b.txt B.txt
Here is a workaround for packages with names like linux-libc-dev_4.4.0-97.120_amd64.deb
:
cd any-temp-dir
apt-get download linux-libc-dev
ar x linux-libc-dev*deb
tar xJf data.tar.xz # ignore all erors like ./usr/include/linux/netfilter/xt_DSCP.h: Cannot open: Input/output error
tar cJf data.tar.xz ./usr
ar rcs linux-libc-dev*.deb debian-binary control.tar.gz data.tar.xz
sudo dpkg -i linux-libc-dev*.deb
edited Nov 23 at 7:35
answered Nov 22 at 16:11
dvo
413
413
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1238903%2fcant-install-linux-libc-dev-in-ubuntu-on-windows%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I ran into this same thing - did you ever find a resolution?
– Peter Tirrell
Aug 15 '17 at 13:44
Unfortunately no.
– Peter
Aug 15 '17 at 15:35