permission denied: /etc/apt/sources.list The 2019 Stack Overflow Developer Survey Results Are InCan't upgrade due to 404 errorI can't upgrade from 12.04 beta2 to 12.04 final, neither install any lensI am receiving a message saying I have duplicate sources but I can't seem to find a duplicate of the line described, any ideas?“Unable to connect” error with apt-get: possible proxy?Can not install updates on ubuntu 12.04 LTS!Some Applications don't open in Ubuntu 12.04 LTS (64 bit)Can't install linux headersFailed to fetch repositories; a particular casedo-release-upgrade from LTS to newer (but not newest!) LTSE: Sub-process /usr/bin/dpkg returned an error code (1) installing jdk and NetBeans
What do hard-Brexiteers want with respect to the Irish border?
A word that means fill it to the required quantity
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
Can a flute soloist sit?
How to support a colleague who finds meetings extremely tiring?
Loose spokes after only a few rides
How can I add encounters in the Lost Mine of Phandelver campaign without giving PCs too much XP?
How to obtain a position of last non-zero element
Getting crown tickets for Statue of Liberty
Ubuntu Server install with full GUI
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
How to notate time signature switching consistently every measure
Is it correct to say the Neural Networks are an alternative way of performing Maximum Likelihood Estimation? if not, why?
I am an eight letter word. What am I?
Why “相同意思的词” is called “同义词” instead of "同意词"?
What's the name of these plastic connectors
Why can't devices on different VLANs, but on the same subnet, communicate?
Get name of standard action overriden in Visualforce contorller
How to charge AirPods to keep battery healthy?
How come people say “Would of”?
If I can cast sorceries at instant speed, can I use sorcery-speed activated abilities at instant speed?
What information about me do stores get via my credit card?
How do PCB vias affect signal quality?
Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?
permission denied: /etc/apt/sources.list
The 2019 Stack Overflow Developer Survey Results Are InCan't upgrade due to 404 errorI can't upgrade from 12.04 beta2 to 12.04 final, neither install any lensI am receiving a message saying I have duplicate sources but I can't seem to find a duplicate of the line described, any ideas?“Unable to connect” error with apt-get: possible proxy?Can not install updates on ubuntu 12.04 LTS!Some Applications don't open in Ubuntu 12.04 LTS (64 bit)Can't install linux headersFailed to fetch repositories; a particular casedo-release-upgrade from LTS to newer (but not newest!) LTSE: Sub-process /usr/bin/dpkg returned an error code (1) installing jdk and NetBeans
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to install java jre, i usually do it like this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
sudo apt-get update
sudo apt-get install update-sun-jre
exit
but when i do
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
i see
permission denied: /etc/apt/sources.list
When i do
ls -l /etc/apt/sources.list
i see
-rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list
When i do
sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list
i see
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop
12.04 installation permissions java
add a comment |
I'm trying to install java jre, i usually do it like this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
sudo apt-get update
sudo apt-get install update-sun-jre
exit
but when i do
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
i see
permission denied: /etc/apt/sources.list
When i do
ls -l /etc/apt/sources.list
i see
-rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list
When i do
sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list
i see
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop
12.04 installation permissions java
add a comment |
I'm trying to install java jre, i usually do it like this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
sudo apt-get update
sudo apt-get install update-sun-jre
exit
but when i do
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
i see
permission denied: /etc/apt/sources.list
When i do
ls -l /etc/apt/sources.list
i see
-rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list
When i do
sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list
i see
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop
12.04 installation permissions java
I'm trying to install java jre, i usually do it like this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5CB26B26
sudo apt-get update
sudo apt-get install update-sun-jre
exit
but when i do
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
i see
permission denied: /etc/apt/sources.list
When i do
ls -l /etc/apt/sources.list
i see
-rw-r--r-- 1 root root 3360 Aug 26 01:45 /etc/apt/sources.list
When i do
sudo mv /etc/apt/sources.list /etc/apt/sources.list.old
sudo cat /etc/apt/sources.list.old | sudo tee /etc/apt/sources.list
i see
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/main/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
#deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise universe
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise multiverse
deb http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://lb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
and the issue is not solved, i still see that permission error, I'm on a 64 bit laptop
12.04 installation permissions java
12.04 installation permissions java
edited Oct 20 '12 at 16:06
Mark Paskal
2,66411827
2,66411827
asked Sep 7 '12 at 21:22
LynobLynob
2,790125395
2,790125395
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.
However, please read my two part answer, this gives you a separate solution (sort of):
1:
Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.
2:
A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.
PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.
add a comment |
What happens with the command is that echo is run as root, but not >>. Try the following instead:
echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list
alternatively, you could do it in two steps:
sudo -i
echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
exit
add a comment |
What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!
sudo nano /etc/apt/sources.list
Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.
You can jump to the next command now...
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
add a comment |
Just simply add sudo again after >> will work for this one. Try this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list
I literally just had same issue and didn't want to backtrack and this worked for me.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f185268%2fpermission-denied-etc-apt-sources-list%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.
However, please read my two part answer, this gives you a separate solution (sort of):
1:
Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.
2:
A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.
PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.
add a comment |
This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.
However, please read my two part answer, this gives you a separate solution (sort of):
1:
Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.
2:
A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.
PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.
add a comment |
This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.
However, please read my two part answer, this gives you a separate solution (sort of):
1:
Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.
2:
A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.
PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.
This is a known issue, when you use sudo in this fashion, it won't work right. That is because while the echo command is run as sudo, the >> for append tries to open the file target as a non-sudo user. That is where the permission issue is.
However, please read my two part answer, this gives you a separate solution (sort of):
1:
Use a separate file in /etc/apt/sources.list.d/ which contains the deb instruction you're saying now. YOu'd still need to use sudo, though, to edit / create the file.
2:
A solution would be to do sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list", which tells the system to run that as superuser, which you get access to by using 'sudo' in front of the 'su' command.
PLEASE NOTE that the su command used outside of the command I stated here is dangerous, so you should only use this method if you absolutely need it.
answered Sep 7 '12 at 21:33
Thomas Ward♦Thomas Ward
45.2k23125178
45.2k23125178
add a comment |
add a comment |
What happens with the command is that echo is run as root, but not >>. Try the following instead:
echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list
alternatively, you could do it in two steps:
sudo -i
echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
exit
add a comment |
What happens with the command is that echo is run as root, but not >>. Try the following instead:
echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list
alternatively, you could do it in two steps:
sudo -i
echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
exit
add a comment |
What happens with the command is that echo is run as root, but not >>. Try the following instead:
echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list
alternatively, you could do it in two steps:
sudo -i
echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
exit
What happens with the command is that echo is run as root, but not >>. Try the following instead:
echo 'deb http://www.duinsoft.nl/pkg debs all' | sudo tee -a /etc/apt/sources.list
alternatively, you could do it in two steps:
sudo -i
echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
exit
answered Sep 7 '12 at 21:35
mikewhatevermikewhatever
24.3k77085
24.3k77085
add a comment |
add a comment |
What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!
sudo nano /etc/apt/sources.list
Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.
You can jump to the next command now...
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
add a comment |
What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!
sudo nano /etc/apt/sources.list
Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.
You can jump to the next command now...
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
add a comment |
What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!
sudo nano /etc/apt/sources.list
Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.
You can jump to the next command now...
What this command does is appending deb http://www.duinsoft.nl/pkg debs all to /etc/apt/sources.list. Let's do it in an other method! Just open that file and append it manually!
sudo nano /etc/apt/sources.list
Then add deb http://www.duinsoft.nl/pkg debs all to end of it and press Ctrl + O and then ENTER to save the changes and finally Ctrl + X to quit nano.
You can jump to the next command now...
answered Jul 27 '16 at 4:51
MiladMilad
14218
14218
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
add a comment |
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
Nice, this helped me a lot!
– Kirill Gusyatin
Oct 20 '16 at 8:57
add a comment |
Just simply add sudo again after >> will work for this one. Try this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list
I literally just had same issue and didn't want to backtrack and this worked for me.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Just simply add sudo again after >> will work for this one. Try this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list
I literally just had same issue and didn't want to backtrack and this worked for me.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Just simply add sudo again after >> will work for this one. Try this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list
I literally just had same issue and didn't want to backtrack and this worked for me.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Just simply add sudo again after >> will work for this one. Try this
sudo echo 'deb http://www.duinsoft.nl/pkg debs all' >> sudo /etc/apt/sources.list
I literally just had same issue and didn't want to backtrack and this worked for me.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 2 days ago
Hippie ChildHippie Child
11
11
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Hippie Child is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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%2f185268%2fpermission-denied-etc-apt-sources-list%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