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

 

 

 

Error trying to install using apt

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
xawii
Posts: 10
Joined: 2019-03-29 12:54
Has thanked: 1 time
Been thanked: 1 time

Error trying to install using apt

#1 Post by xawii »

I am new to GNU/Linux. I installed Debian stretch using DVD.
Soon I found that sudo package was not installed and I ran a command to install it. It asked me to install the DVD. This way I installed sudo package. I expected it to use the Internet though.
Second time I tried to install vim. And again it asked me for a DVD. This time it didn’t work.
Here is what my etc/apt/sources.list looks like:

Code: Select all

# 

# deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main

deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main

# Line commented out by installer because it failed to verify:
#deb http://security.debian.org/debian-security stretch/updates main contrib
# Line commented out by installer because it failed to verify:
#deb-src http://security.debian.org/debian-security stretch/updates main contrib

# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
#deb http://deb.debian.org/debian/ stretch-updates main contrib
#deb-src http://deb.debian.org/debian/ stretch-updates main contrib
After the changes I made it looks like following:

Code: Select all

# 

# deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main

#deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main

# Line commented out by installer because it failed to verify:
deb http://security.debian.org/debian-security stretch/updates main contrib
# Line commented out by installer because it failed to verify:
deb-src http://security.debian.org/debian-security stretch/updates main contrib

# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
 deb http://deb.debian.org/debian/ stretch-updates main contrib
 deb-src http://deb.debian.org/debian/ stretch-updates main contrib
Then I ran this:

Code: Select all

su- apt-get update
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]             
Get:2 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]   
Get:3 http://security-cdn.debian.org/debian-security stretch/updates/main Sources [199 kB]                           
Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates/main Sources [14.3 kB]                                 
Get:5 http://cdn-fastly.deb.debian.org/debian stretch-updates/main i386 Packages [11.4 kB]                           
Get:6 http://cdn-fastly.deb.debian.org/debian stretch-updates/main Translation-en [11.1 kB]                          
Get:7 http://security-cdn.debian.org/debian-security stretch/updates/contrib Sources [1,384 B]                       
Get:8 http://security-cdn.debian.org/debian-security stretch/updates/main i386 Packages [485 kB]                     
Get:9 http://security-cdn.debian.org/debian-security stretch/updates/main Translation-en [215 kB]                    
Get:10 http://security-cdn.debian.org/debian-security stretch/updates/contrib i386 Packages [1,760 B]                
Get:11 http://security-cdn.debian.org/debian-security stretch/updates/contrib Translation-en [1,759 B]               
Fetched 1,126 kB in 47s (23.8 kB/s)                                                                                  
Reading package lists... Done
Than I ran this:

Code: Select all

su- apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate
And now I wonder what to do next. I do read a lot from Handbook and Reference, sometimes I dare to peek into man pages which are scary. But the truth is I am not yet able to use it effectively because there is so much to Linux. It doesn’t happen all at once. So, It would be nice If anybody could help me. Every step I made was dictated by identical questions on other forums. Thank you!

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

Re: Error trying to install using apt

#2 Post by Head_on_a_Stick »

You've added the security-updates & stretch-updates repositories but not the stretch repositories themselves.

See the Debian wiki page about sources for a list. Or any one of the seven million or so other threads about this exact same issue that we have on these boards.
deadbang

xawii
Posts: 10
Joined: 2019-03-29 12:54
Has thanked: 1 time
Been thanked: 1 time

Re: Error trying to install using apt

#3 Post by xawii »

Head_on_a_Stick wrote: See the Debian wiki page about sources for a list.
Thank you, I have read the Wiki page for sources.list, saw a list of mirrors and man pages. I picked one of the mirrors and added two more lines to my sources.list file.

Code: Select all

deb http://debian.balt.net stable main contrib non-free
deb-src http://debian.balt.net stable main contrib non-free

deb http://security.debian.org/debian-security stable/updates main contrib
deb-src http://security.debian.org/debian-security stable/updates main contrib

deb http://deb.debian.org/debian/ stable-updates main contrib
deb-src http://deb.debian.org/debian/ stable-updates main contrib

# deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main
#deb cdrom:[Debian GNU/Linux 9.8.0 _Stretch_ - Official i386 DVD Binary-1 20190216-12:51]/ stretch contrib main
Then I tried updating:

Code: Select all

apt-get update
Ign:1 http://debian.balt.net stable InRelease                                              
Ign:3 http://debian.balt.net stable Release                                                
Ign:5 http://debian.balt.net stable/contrib Sources
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Ign:16 http://debian.balt.net stable/non-free i386 Packages
Ign:17 http://debian.balt.net stable/non-free all Packages
Ign:18 http://debian.balt.net stable/non-free Translation-en
Ign:19 http://debian.balt.net stable/non-free Translation-en_US
Ign:5 http://debian.balt.net stable/contrib Sources
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Ign:16 http://debian.balt.net stable/non-free i386 Packages
Ign:17 http://debian.balt.net stable/non-free all Packages
Ign:18 http://debian.balt.net stable/non-free Translation-en
Ign:19 http://debian.balt.net stable/non-free Translation-en_US
Ign:5 http://debian.balt.net stable/contrib Sources
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Ign:16 http://debian.balt.net stable/non-free i386 Packages
Ign:17 http://debian.balt.net stable/non-free all Packages
Ign:18 http://debian.balt.net stable/non-free Translation-en
Ign:19 http://debian.balt.net stable/non-free Translation-en_US
Ign:5 http://debian.balt.net stable/contrib Sources
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Ign:16 http://debian.balt.net stable/non-free i386 Packages
Ign:17 http://debian.balt.net stable/non-free all Packages
Ign:18 http://debian.balt.net stable/non-free Translation-en
Ign:19 http://debian.balt.net stable/non-free Translation-en_US
Ign:5 http://debian.balt.net stable/contrib Sources
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Ign:16 http://debian.balt.net stable/non-free i386 Packages
Ign:17 http://debian.balt.net stable/non-free all Packages
Ign:18 http://debian.balt.net stable/non-free Translation-en
Ign:19 http://debian.balt.net stable/non-free Translation-en_US
Err:5 http://debian.balt.net stable/contrib Sources
  404  Not Found
Ign:6 http://debian.balt.net stable/non-free Sources
Ign:7 http://debian.balt.net stable/main Sources
Ign:8 http://debian.balt.net stable/main i386 Packages
Ign:9 http://debian.balt.net stable/main all Packages
Ign:10 http://debian.balt.net stable/main Translation-en_US
Ign:11 http://debian.balt.net stable/main Translation-en
Ign:12 http://debian.balt.net stable/contrib all Packages
Ign:13 http://debian.balt.net stable/contrib i386 Packages
Ign:14 http://debian.balt.net stable/contrib Translation-en_US
Ign:15 http://debian.balt.net stable/contrib Translation-en
Get:2 http://security-cdn.debian.org/debian-security stable/updates InRelease [94.3 kB]
Get:4 http://cdn-fastly.deb.debian.org/debian stable-updates InRelease [91.0 kB]                                             
Get:20 http://security-cdn.debian.org/debian-security stable/updates/main Sources [199 kB]                                   
Get:21 http://cdn-fastly.deb.debian.org/debian stable-updates/main Sources [14.3 kB]                                         
Get:22 http://cdn-fastly.deb.debian.org/debian stable-updates/main i386 Packages [11.4 kB]                                   
Get:23 http://cdn-fastly.deb.debian.org/debian stable-updates/main Translation-en [11.1 kB]                                  
Get:24 http://security-cdn.debian.org/debian-security stable/updates/contrib Sources [1,384 B]                               
Get:25 http://security-cdn.debian.org/debian-security stable/updates/main i386 Packages [485 kB]                             
Get:26 http://security-cdn.debian.org/debian-security stable/updates/main Translation-en [215 kB]                            
Get:27 http://security-cdn.debian.org/debian-security stable/updates/contrib i386 Packages [1,760 B]                         
Get:28 http://security-cdn.debian.org/debian-security stable/updates/contrib Translation-en [1,759 B]                        
Fetched 1,126 kB in 52s (21.4 kB/s)                                                                                          
Reading package lists... Done
W: The repository 'http://debian.balt.net stable Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://debian.balt.net/dists/stable/contrib/source/Sources  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
As you can see I have some errors. Do these errors matter a lot? Thank you!

Also:

Code: Select all

apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Error trying to install using apt

#4 Post by stevepusser »

Use the same redirector as the other channels are using.

Code: Select all

deb http://deb.debian.org/debian/ stretch main contrib non-free
deb-src http://deb.debian.org/debian/ stretch main contrib non-free
Since contrib packages may require non-free ones, I fixed that for you. Either have both contrib and non-free, or none.
Edit: Per Stickhead, also changed "stable" to "stretch".
Last edited by stevepusser on 2019-04-06 21:40, edited 2 times in total.
MX Linux packager and developer

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

Re: Error trying to install using apt

#5 Post by Head_on_a_Stick »

Also, it's probably better to use stretch rather than stable unless you want a surprise upgrade to buster when it is released in a few months.

@stevepusser: some contrib packages don't require the non-free component, for example https://packages.debian.org/stretch/ttf ... -installer
deadbang

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 72 times

Re: Error trying to install using apt

#6 Post by stevepusser »

Head_on_a_Stick wrote:Also, it's probably better to use stretch rather than stable unless you want a surprise upgrade to buster when it is released in a few months.

@stevepusser: some contrib packages don't require the non-free component, for example https://packages.debian.org/stretch/ttf ... -installer
I did say "may". :) I was just trying to avoid the next question about why some package won't install. :D :D
MX Linux packager and developer

Post Reply