nie dzia

Konfiguracja serwerów, usług, itp.
Awatar użytkownika
shyte
Beginner
Posty: 165
Rejestracja: 04 grudnia 2009, 00:06

nie działa apt-get update

Post autor: shyte »

Witam.
Zainstalowałem sobie dzisiaj gnome na serwerze vps i jak wpisuję:

Kod: Zaznacz cały

apt-get update
lub:

Kod: Zaznacz cały

apt-get install wine
bo chce zainstalować wine to mam takie błędy nie wiem co dalej?

Kod: Zaznacz cały

root@ozet:~# apt-get update
Err [url]http://security.debian.org[/url] lenny/updates Release.gpg
  Could not resolve 'security.debian.org'
Err [url]http://ftp2.de.debian.org[/url] lenny Release.gpg
  Could not resolve 'ftp2.de.debian.org'
Err [url]http://ftp2.de.debian.org[/url] lenny/updates Release.gpg
  Could not resolve 'ftp2.de.debian.org'
Err [url]http://ftp.pl.debian.org[/url] lenny Release.gpg
  Could not resolve 'ftp.pl.debian.org'
Reading package lists... Done
W: Failed to fetch [url]http://ftp2.de.debian.org/debian/dists/lenny/Release.gpg[/url]  Could not resolve 'ftp2.de.debian.org'

W: Failed to fetch [url]http://ftp2.de.debian.org/debian-security/dists/lenny/updates/Release.gpg[/url]  Could not resolve 'ftp2.de.debian.org'

W: Failed to fetch [url]http://ftp.pl.debian.org/debian/dists/lenny/Release.gpg[/url]  Could not resolve 'ftp.pl.debian.org'

W: Failed to fetch [url]http://security.debian.org/dists/lenny/updates/Release.gpg[/url]  Could not resolve 'security.debian.org'

W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems
root@ozet:~#
Wynik po poleceniu:

Kod: Zaznacz cały

root@ozet:~# apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine 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 wine has no installation candidate
root@ozet:~#
db
Beginner
Posty: 185
Rejestracja: 25 czerwca 2006, 15:23

Post autor: db »

Could not resolve 'security.debian.org'
DNSy sobie skonfiguruj.

Kod: Zaznacz cały

man resolv.conf
Awatar użytkownika
shyte
Beginner
Posty: 165
Rejestracja: 04 grudnia 2009, 00:06

Post autor: shyte »

A mógłbyś podać jakiś przykład, jak to ma miałoby wyglądać? Ja w pliku, resolv.conf.

W tym pliku mam tylko:

Kod: Zaznacz cały

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Czy chodzi o te dnsy co w tym temacie?
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

shyte pisze:A mógłbyś podać jakiś przykład, jak to ma miałoby wyglądać? Ja w pliku, resolv.conf.

W tym pliku mam tylko:

Kod: Zaznacz cały

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Czy chodzi o te dnsy co w tym temacie?
Bynajmniej. Nie interesuje Cię konfiguracja serwera nazw. Prawdopodobnie coś (jakiś program, bądź network manager edytowało Ci ustawienia DNS.

Edycja:
Wklej najpierw wynik polecenia:

Kod: Zaznacz cały

cat /etc/network/interfaces
Awatar użytkownika
shyte
Beginner
Posty: 165
Rejestracja: 04 grudnia 2009, 00:06

Post autor: shyte »

Kod: Zaznacz cały

root@ozet:~# cat /etc/network/interfaces
# This configuration file is auto-generated.
# WARNING: Do not edit this file, otherwise your changes will be lost.
# Please edit template /etc/network/interfaces.template instead.


# Auto generated interfaces
auto lo
iface lo inet loopback

auto venet0
iface venet0 inet static
        address 127.0.0.1
        netmask 255.255.255.255
        broadcast 0.0.0.0
        up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
        up route add default gw 192.0.2.1
auto venet0:0
iface venet0:0 inet static
        address 80.82.17.153
        netmask 255.255.255.255
        broadcast 0.0.0.0

auto venet0:1
iface venet0:1 inet static
        address 80.82.17.135
        netmask 255.255.255.255
        broadcast 0.0.0.0

root@ozet:~#

Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

Używasz czegoś co generuje Ci te pliki dynamicznie. Wklej wynik polecenia:

Kod: Zaznacz cały

cat /etc/network/interfaces.template
Awatar użytkownika
shyte
Beginner
Posty: 165
Rejestracja: 04 grudnia 2009, 00:06

Post autor: shyte »

Kod: Zaznacz cały

root@ozet:~# cat /etc/network/interfaces.template
cat: /etc/network/interfaces.template: No such file or directory
root@ozet:~#
Awatar użytkownika
MadCow
Posty: 14
Rejestracja: 24 maja 2006, 16:00

Post autor: MadCow »

Nie wiem czemu prosisz go o listę interfejsów.
shyte brakuje Ci wpisów w /etc/resolv.conf.
Awatar użytkownika
Bastian
Member
Posty: 1424
Rejestracja: 30 marca 2008, 16:09
Lokalizacja: Poznañ

Post autor: Bastian »

MadCow pisze:Nie wiem czemu prosisz go o listę interfejsów.
shyte brakuje Ci wpisów w /etc/resolv.conf.
Dlatego, że do generowania resolv.conf używa resolvera, który zapewne nadpisze mu ten plik. Spójrz:

http://www.debian.org/doc/manuals/refer ... resolvconf

@shyte:

W /etc/network/interfaces dodaj:

Kod: Zaznacz cały

auto venet0
iface venet0 inet static
        address 127.0.0.1
        netmask 255.255.255.255
        broadcast 0.0.0.0
        up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
        up route add default gw 192.0.2.1
        dns-nameservers 194.204.152.34 194.204.159.1
auto venet0:0
iface venet0:0 inet static
        address 80.82.17.153
        netmask 255.255.255.255
        broadcast 0.0.0.0
        dns-nameservers 194.204.152.34 194.204.159.1

auto venet0:1
iface venet0:1 inet static
        address 80.82.17.135
        netmask 255.255.255.255
        broadcast 0.0.0.0
        dns-nameservers 194.204.152.34 194.204.159.1

I zresetuj interfejs.
Awatar użytkownika
shyte
Beginner
Posty: 165
Rejestracja: 04 grudnia 2009, 00:06

Post autor: shyte »

Bastian

dodałem ale po restarcie np serwera zmienia mi się na:
cała zawartość pliku interfaces

Kod: Zaznacz cały

# This configuration file is auto-generated.
# WARNING: Do not edit this file, otherwise your changes will be lost.
# Please edit template /etc/network/interfaces.template instead.


# Auto generated interfaces
auto lo
iface lo inet loopback

auto venet0
iface venet0 inet static
    address 127.0.0.1
    netmask 255.255.255.255
    broadcast 0.0.0.0
    up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
    up route add default gw 192.0.2.1
auto venet0:0
iface venet0:0 inet static
    address 80.82.17.153
    netmask 255.255.255.255
    broadcast 0.0.0.0

auto venet0:1
iface venet0:1 inet static
    address 80.82.17.135
    netmask 255.255.255.255
    broadcast 0.0.0.0
ODPOWIEDZ