Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

problem when trying to install sudo

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
santiago ferreiro
Posts: 3
Joined: 2018-10-17 23:22

problem when trying to install sudo

#1 Post by santiago ferreiro »

I was trying to install sudo on my VM and when i used the code

Code: Select all

apt install sudo
the output was this:
E: Sub-process /usr/bin/dpkg returned an error code (2), can someone tell me how to fix this?

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: problem when trying to install sudo

#2 Post by GarryRicketson »

You need to be root to install packages, maybe try:

Code: Select all

su - apt install sudo
Also which version of Debian might be relevant.
Last edited by GarryRicketson on 2018-10-17 23:48, edited 1 time in total.

santiago ferreiro
Posts: 3
Joined: 2018-10-17 23:22

Re: problem when trying to install sudo

#3 Post by santiago ferreiro »

GarryRicketson wrote:You need to be root to install packages, maybe try:

Code: Select all

su ~ apt install sudo
Also which version of Debian might be relevent.
I'm already root and if im not wrong its debian 9

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: problem when trying to install sudo

#4 Post by GarryRicketson »

Ok, well, I am not sure then, also, did you use the - after su ?
and I had made a typo, in my post, I edited it,

Code: Select all

su - 
instead of ~ but anyway that is a issue on Debian testing, (buster) and I don't think it effects Debian 9, (Stretch)

santiago ferreiro
Posts: 3
Joined: 2018-10-17 23:22

Re: problem when trying to install sudo

#5 Post by santiago ferreiro »

GarryRicketson wrote:Ok, well, I am not sure then, also, did you use the - after su ?
and I had made a typo, in my post, I edited it,

Code: Select all

su - 
instead of ~ but anyway that is a issue on Debian testing, (buster) and I don't think it effects Debian 9, (Stretch)
I just tried with the " - " and it still doesn't work, if you have any other ideas i would be glad to hear them :D, thanks anyway

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: problem when trying to install sudo

#6 Post by GarryRicketson »

What if you try ? :

Code: Select all

apt clean
(as root)
and after that:

Code: Select all

apt update
(as root)
and then try to install the package again, show us what any more errors say, if it does not work.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: problem when trying to install sudo

#7 Post by Head_on_a_Stick »

santiago ferreiro wrote:can someone tell me how to fix this?
I would enter the error message you have quoted into a search engine, this is the top result and shows how to fix your problem:

https://askubuntu.com/questions/591855/ ... ror-code-2

See also http://forums.debian.net/viewtopic.php?f=30&t=47078
deadbang

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: problem when trying to install sudo

#8 Post by debiman »

santiago ferreiro wrote:I was trying to install sudo on my VM and when i used the code

Code: Select all

apt install sudo
the output was this:
E: Sub-process /usr/bin/dpkg returned an error code (2), can someone tell me how to fix this?
is that the complete output you're getting?

Post Reply