Portál AbcLinuxu, 14. května 2025 01:30
error: could not open sync database repository-nameTo sem samozrejme zkusil. (
have you used --refresh yet?
pacman -S --refresh
)gethostbyname: Resource temporarily unavailableA to asi tak na dve stranky vzdy s jinym serverem. (mozna vsechny existujici repozitare) A nakonec zase predchozi hlaska :-/
error: cannot connect to (server)
[repository-name] Server = ftp://ftp.sh.cvut.cz/MIRRORS/archBylo mi receno abych jako repozitar dal spise:
$cat /etc/pacman.conf # # /etc/pacman.conf # # NOTE: If you find a mirror that is geographically close to you, please # move it to the top of the server list, so pacman will choose it # first. # # To re-sort your mirror lists by ping/traceroute results, use the # /usr/bin/sortmirrors script. It requires the "netselect" package. # # See the pacman manpage for option directives # # GENERAL OPTIONS # [options] LogFile = /var/log/pacman.log NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf NoUpgrade = etc/rc.conf etc/rc.local NoUpgrade = etc/modprobe.conf etc/modules.conf NoUpgrade = etc/lilo.conf boot/grub/menu.lst HoldPkg = pacman glibc #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u # # REPOSITORIES # - can be defined here or included from another file # - pacman will search repositories in the order defined here. # - local/custom mirrors can be added here or in separate files # #[testing] #Server = ftp://ftp.archlinux.org/testing/os/i686 [current] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/current [extra] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/extra [unstable] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/unstable [community] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/community # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] #Server = file:///home/custompkgs #[danimoth] #Server = http://jjdanimoth.altervista.org/arch/i686 [root@max max]# cat /etc/pacman.conf # # /etc/pacman.conf # # NOTE: If you find a mirror that is geographically close to you, please # move it to the top of the server list, so pacman will choose it # first. # # To re-sort your mirror lists by ping/traceroute results, use the # /usr/bin/sortmirrors script. It requires the "netselect" package. # # See the pacman manpage for option directives # # GENERAL OPTIONS # [options] LogFile = /var/log/pacman.log NoUpgrade = etc/passwd etc/group etc/shadow etc/sudoers NoUpgrade = etc/fstab etc/raidtab etc/ld.so.conf NoUpgrade = etc/rc.conf etc/rc.local NoUpgrade = etc/modprobe.conf etc/modules.conf NoUpgrade = etc/lilo.conf boot/grub/menu.lst HoldPkg = pacman glibc #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u # # REPOSITORIES # - can be defined here or included from another file # - pacman will search repositories in the order defined here. # - local/custom mirrors can be added here or in separate files # #[testing] #Server = ftp://ftp.archlinux.org/testing/os/i686 [current] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/current [extra] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/extra [unstable] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/unstable [community] # Add your preferred servers here, they will be used first Include = /etc/pacman.d/community # An example of a custom package repository. See the pacman manpage for # tips on creating your own repositories. #[custom] #Server = file:///home/custompkgs #[danimoth] #Server = http://jjdanimoth.altervista.org/arch/i686
$cat /etc/pacman.d/current # # CURRENT: Arch Linux core repository # [current] # Europe # - Czech Republic Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/current/os/i686
$cat /etc/pacman.d/communiti # # The Community tree. These are community-maintained packages from the # Arch User Repository (http://aur.archlinux.org) [community] # Europe # - Czech Republic Server = ftp://ftp.sh.cvut.cz/MIRRORS/arch/community/os/i686To samé se všema ostatníma repositářema => testing apod.
$pacman --version .--. Pacman v3.0.4 - libalpm v1.0.0 / _.-' .-. .-. .-. Copyright (C) 2002-2007 Judd Vinet <jvinet@zeroflux.org> \ '-. '-' '-' '-' '--' This program may be freely redistributed under the terms of the GNU General Public LicensePředpokládám že síť ti jede :), spíš bych tipoval, že máš blbě nastaven pacman.conf
PS: Linux nemam moc dlouho a nejsem zadnej velkej expert, tak na to prosim vemte ohled :)Neboj se, nikdo tě tu nesežere.
error: could not open sync database repository-name
have you used --refresh yet?
Jasně, napřed se musí stáhnout databáze balíčků z repository, aby pacman věděl, co v ní vlastně je. Ve wiki se dočteš třeba o vytváření lokálních vlastních repository na disku. Tam je pěkně popsáno, jak taková repository funguje a kde má uložená data. Ne že bys musel hned tvořit vlastní repository, ale je velmi prospěšné si to přečíst a pochopit ten princip.
To sem samozrejme zkusil. (pacman -S --refresh
)
Vystup:gethostbyname: Resource temporarily unavailable
error: cannot connect to (server)
Občas se stane, že některé z repozitářů selžou. Za poslední rok jsem to viděl cca dvakrát. A to updatuju každý týden.
Ale tohle je zcela jiný problém. Zkontroluj si zejména DNS servery v /etc/resolv.conf. Dál si ověř, že máš správně nastavený přístup k Internetu na routerech a že se opravdu dostaneš na nějaký server. Pro začátek zkus pingnout DNS servery. Zkontroluj v /etc/rc.conf, zda máš správně nastavený gateway, masku podsítě a další parametry. I hloupý překlep může člověku tu a tam zavařit. (Nebo třeba automatické přepsání /etc/resolv.conf špatnými hodnotami z DHCP serveru...)
Nejnovější verze pacmana má skript zvaný rankmirrors. Můžeš ho použít k nalezení nejlépe vyhovujících mirrorů. Já ho ale nepoužívám, protože defaultní seznam mi vyhovuje a funguje mi dobře. Vím, že je nezodpovědné dělat zbytečně traffic do zahraničí, ale nechce se mi v tom vrtat.
Pro update systému se většinou používá pacman -Syu
. Viz (znamenitá) manuálová stránka pro pacman. Jinak se s tím dají dělat další kouzla, třeba kompilovaný update balíčků s automatickým řešením závislostí, nalezení balíčků, na kterých nic nezávisí apod.
/etc/rc.conf
. Protože nevím, jak je řešeno vaše připojení tak přesněji to popsat nemůžu. Pokud je to wi-fi nebo USB modem, tak se většinou musí nainstalovat ovladače a wi-fi se i jinak nastavuje.
# pacman -Sy failed downloading current.db.tar.gz from ftp.sh.cvut.cz: 550 failed to open file (ten soubor tam ale opravdu je) failed to synchronize current failed to synchronize extra warning: failed to get filesize from community.db.tar.gz warning: failed to get mtime from community.db.tar.gzatd atd - pak uz je to porad to samy akorat treba testing apod.
ftp://ftp.hosteurope.de/
, Aktualizuje se brzo a je jeden z nejrychlejších.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.