How to install dos2unix on a Ubuntu app on a Windows-10 machine
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I have a Ubuntu app, installed on my Windows-10 machine. As far as versions are concerned, this is the result of uname -a
:
Linux <username> 4.4.0-17134-Microsoft #523-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
Using this Linux "emulator", as I call it, I regularly do grep
, find
, wc -l
, sort
, ..., for analysis purposes, but this sometimes generates output files in UNIX format (I'm talking about line endings).
In order to get Windows line endings, I decided to launch a unix2dos
on the file, but this gave following error message:
The program 'unix2dos' is currently not installed. You can install it by typing:
sudo apt install dos2unix
In other words, my app knows that, in order to do unix2dos
, the package dos2unix
is needed. This looks like good news, except for the fact that I'm not able to install it:
sudo apt install dos2unix
[sudo] password for <username>:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dos2unix
I have already installed packages before, so it should be a problem specific for the dos2unix
package.
For your information:
- I don't have a
/var/log/messages
file.
dmesg
doesn't work:dmesg: read kernel buffer failed: Function not implemented
- I have a
/var/log
directory, but the latest file/directory modification is around a week ago. - I have a
/var/log/apt
directory, but the latest file/directory modification is around a week ago. - I tried debugging this myself, using
strace
, but this failed (strace: exec: Operation not permitted
,+++ exited with 1 +++
).
Edited after first comment
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=amd64
origin security.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
Pinned packages:
Does anybody have an idea?
apt package-management software-installation windows-10
add a comment |
I have a Ubuntu app, installed on my Windows-10 machine. As far as versions are concerned, this is the result of uname -a
:
Linux <username> 4.4.0-17134-Microsoft #523-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
Using this Linux "emulator", as I call it, I regularly do grep
, find
, wc -l
, sort
, ..., for analysis purposes, but this sometimes generates output files in UNIX format (I'm talking about line endings).
In order to get Windows line endings, I decided to launch a unix2dos
on the file, but this gave following error message:
The program 'unix2dos' is currently not installed. You can install it by typing:
sudo apt install dos2unix
In other words, my app knows that, in order to do unix2dos
, the package dos2unix
is needed. This looks like good news, except for the fact that I'm not able to install it:
sudo apt install dos2unix
[sudo] password for <username>:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dos2unix
I have already installed packages before, so it should be a problem specific for the dos2unix
package.
For your information:
- I don't have a
/var/log/messages
file.
dmesg
doesn't work:dmesg: read kernel buffer failed: Function not implemented
- I have a
/var/log
directory, but the latest file/directory modification is around a week ago. - I have a
/var/log/apt
directory, but the latest file/directory modification is around a week ago. - I tried debugging this myself, using
strace
, but this failed (strace: exec: Operation not permitted
,+++ exited with 1 +++
).
Edited after first comment
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=amd64
origin security.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
Pinned packages:
Does anybody have an idea?
apt package-management software-installation windows-10
Please add the output ofapt-cache policy
to your question. It shows the packages sources you are using.
– Florian Diesch
Feb 12 at 15:05
@FlorianDiesch: I edited my question accordingly (I have no knowledge aboutapt-cache policy
, I have no idea what this means.
– Dominique
Feb 12 at 15:39
Can yousudo add-apt-repository universe
and thensudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
@CharlesGreen: thanks: theget-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.
– Dominique
Feb 12 at 15:47
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that theapt
commands usually com in two partsapt update
my list of software andapt upgrade
the software in my system.
– Charles Green
Feb 12 at 15:51
add a comment |
I have a Ubuntu app, installed on my Windows-10 machine. As far as versions are concerned, this is the result of uname -a
:
Linux <username> 4.4.0-17134-Microsoft #523-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
Using this Linux "emulator", as I call it, I regularly do grep
, find
, wc -l
, sort
, ..., for analysis purposes, but this sometimes generates output files in UNIX format (I'm talking about line endings).
In order to get Windows line endings, I decided to launch a unix2dos
on the file, but this gave following error message:
The program 'unix2dos' is currently not installed. You can install it by typing:
sudo apt install dos2unix
In other words, my app knows that, in order to do unix2dos
, the package dos2unix
is needed. This looks like good news, except for the fact that I'm not able to install it:
sudo apt install dos2unix
[sudo] password for <username>:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dos2unix
I have already installed packages before, so it should be a problem specific for the dos2unix
package.
For your information:
- I don't have a
/var/log/messages
file.
dmesg
doesn't work:dmesg: read kernel buffer failed: Function not implemented
- I have a
/var/log
directory, but the latest file/directory modification is around a week ago. - I have a
/var/log/apt
directory, but the latest file/directory modification is around a week ago. - I tried debugging this myself, using
strace
, but this failed (strace: exec: Operation not permitted
,+++ exited with 1 +++
).
Edited after first comment
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=amd64
origin security.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
Pinned packages:
Does anybody have an idea?
apt package-management software-installation windows-10
I have a Ubuntu app, installed on my Windows-10 machine. As far as versions are concerned, this is the result of uname -a
:
Linux <username> 4.4.0-17134-Microsoft #523-Microsoft Mon Dec 31 17:49:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
Using this Linux "emulator", as I call it, I regularly do grep
, find
, wc -l
, sort
, ..., for analysis purposes, but this sometimes generates output files in UNIX format (I'm talking about line endings).
In order to get Windows line endings, I decided to launch a unix2dos
on the file, but this gave following error message:
The program 'unix2dos' is currently not installed. You can install it by typing:
sudo apt install dos2unix
In other words, my app knows that, in order to do unix2dos
, the package dos2unix
is needed. This looks like good news, except for the fact that I'm not able to install it:
sudo apt install dos2unix
[sudo] password for <username>:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dos2unix
I have already installed packages before, so it should be a problem specific for the dos2unix
package.
For your information:
- I don't have a
/var/log/messages
file.
dmesg
doesn't work:dmesg: read kernel buffer failed: Function not implemented
- I have a
/var/log
directory, but the latest file/directory modification is around a week ago. - I have a
/var/log/apt
directory, but the latest file/directory modification is around a week ago. - I tried debugging this myself, using
strace
, but this failed (strace: exec: Operation not permitted
,+++ exited with 1 +++
).
Edited after first comment
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin security.ubuntu.com
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-security,n=xenial,l=Ubuntu,c=main,b=amd64
origin security.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial-updates,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=restricted,b=amd64
origin archive.ubuntu.com
500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main,b=amd64
origin archive.ubuntu.com
Pinned packages:
Does anybody have an idea?
apt package-management software-installation windows-10
apt package-management software-installation windows-10
edited Feb 12 at 15:38
Dominique
asked Feb 12 at 10:21
DominiqueDominique
1107
1107
Please add the output ofapt-cache policy
to your question. It shows the packages sources you are using.
– Florian Diesch
Feb 12 at 15:05
@FlorianDiesch: I edited my question accordingly (I have no knowledge aboutapt-cache policy
, I have no idea what this means.
– Dominique
Feb 12 at 15:39
Can yousudo add-apt-repository universe
and thensudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
@CharlesGreen: thanks: theget-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.
– Dominique
Feb 12 at 15:47
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that theapt
commands usually com in two partsapt update
my list of software andapt upgrade
the software in my system.
– Charles Green
Feb 12 at 15:51
add a comment |
Please add the output ofapt-cache policy
to your question. It shows the packages sources you are using.
– Florian Diesch
Feb 12 at 15:05
@FlorianDiesch: I edited my question accordingly (I have no knowledge aboutapt-cache policy
, I have no idea what this means.
– Dominique
Feb 12 at 15:39
Can yousudo add-apt-repository universe
and thensudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
@CharlesGreen: thanks: theget-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.
– Dominique
Feb 12 at 15:47
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that theapt
commands usually com in two partsapt update
my list of software andapt upgrade
the software in my system.
– Charles Green
Feb 12 at 15:51
Please add the output of
apt-cache policy
to your question. It shows the packages sources you are using.– Florian Diesch
Feb 12 at 15:05
Please add the output of
apt-cache policy
to your question. It shows the packages sources you are using.– Florian Diesch
Feb 12 at 15:05
@FlorianDiesch: I edited my question accordingly (I have no knowledge about
apt-cache policy
, I have no idea what this means.– Dominique
Feb 12 at 15:39
@FlorianDiesch: I edited my question accordingly (I have no knowledge about
apt-cache policy
, I have no idea what this means.– Dominique
Feb 12 at 15:39
Can you
sudo add-apt-repository universe
and then sudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
Can you
sudo add-apt-repository universe
and then sudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
@CharlesGreen: thanks: the
get-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.– Dominique
Feb 12 at 15:47
@CharlesGreen: thanks: the
get-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.– Dominique
Feb 12 at 15:47
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that the
apt
commands usually com in two parts apt update
my list of software and apt upgrade
the software in my system.– Charles Green
Feb 12 at 15:51
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that the
apt
commands usually com in two parts apt update
my list of software and apt upgrade
the software in my system.– Charles Green
Feb 12 at 15:51
add a comment |
1 Answer
1
active
oldest
votes
You need to ativate the "universe" repository component. See How do I enable the "Universe" repository? for how to do that.
See What's the difference between multiverse, universe, restricted and main? for more information about repository components.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2faskubuntu.com%2fquestions%2f1117623%2fhow-to-install-dos2unix-on-a-ubuntu-app-on-a-windows-10-machine%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to ativate the "universe" repository component. See How do I enable the "Universe" repository? for how to do that.
See What's the difference between multiverse, universe, restricted and main? for more information about repository components.
add a comment |
You need to ativate the "universe" repository component. See How do I enable the "Universe" repository? for how to do that.
See What's the difference between multiverse, universe, restricted and main? for more information about repository components.
add a comment |
You need to ativate the "universe" repository component. See How do I enable the "Universe" repository? for how to do that.
See What's the difference between multiverse, universe, restricted and main? for more information about repository components.
You need to ativate the "universe" repository component. See How do I enable the "Universe" repository? for how to do that.
See What's the difference between multiverse, universe, restricted and main? for more information about repository components.
answered Feb 12 at 15:48
Florian DieschFlorian Diesch
66k16168183
66k16168183
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1117623%2fhow-to-install-dos2unix-on-a-ubuntu-app-on-a-windows-10-machine%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
Please add the output of
apt-cache policy
to your question. It shows the packages sources you are using.– Florian Diesch
Feb 12 at 15:05
@FlorianDiesch: I edited my question accordingly (I have no knowledge about
apt-cache policy
, I have no idea what this means.– Dominique
Feb 12 at 15:39
Can you
sudo add-apt-repository universe
and thensudo apt update && sudo apt install dos2unix
– Charles Green
Feb 12 at 15:44
@CharlesGreen: thanks: the
get-repository universe
was obsolete, but the two second ones solved my situation. Please add it as an answer, I'll accept it.– Dominique
Feb 12 at 15:47
it ad add-repository... but I'm glad it worked for you. Basically @FlorianDiesch and I were going in exactly the same direction, and he was here 1st! Please note that the
apt
commands usually com in two partsapt update
my list of software andapt upgrade
the software in my system.– Charles Green
Feb 12 at 15:51