You are not logged in.
Pages: 1
I would have thought that `direnv` would be found:
[root@localhost ~]# pacman -S direnv
error: target not found: direnv
The packages are up to date as `sudo pacman -Syu` has recently been run.
It (direnv) really exists as a package because you can see it here:
https://archlinux.org/packages/community/x86_64/direnv/
What do I need to do to install direnv?
Offline
Post your pacman.conf and your mirrorlist.
Offline
## Singapore
Server = http://mirror.0x.sg/archlinux/$repo/os/$arch
Server = https://mirror.0x.sg/archlinux/$repo/os/$arch
Server = http://mirror.aktkn.sg/archlinux/$repo/os/$arch
Server = https://mirror.aktkn.sg/archlinux/$repo/os/$arch
## United States
Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
Those are the uncommented lines from /etc/pacman/mirrorlist. This is a Linode from a Data Centre in Singapore. These are same from /etc/pacman.conf:
[options]
HoldPkg = pacman glibc
Architecture = auto
CheckSpace
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[core]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
Offline
The mirror that counts is the one at the top of the mirrorlist. In this case, that mirror hasn't updated since 14-Dec-2020. You're WAY, WAY out of date. The reason you can't install direnv is because it didn't exist a year and a half ago.
Offline
Thanks. I used reflector (https://xyne.dev/projects/reflector/) to get past that problem. Need to do `sudo pacman -Syyu` after reflector has overwritten /etc/pacman.d/mirrorlist. Still not out of the woods yet, but this particular problem seems to have been fixed. Thanks again @Scimmia.
Offline
\Need to do `sudo pacman -Syyu` after reflector has overwritten /etc/pacman.d/mirrorlist.
We're always told around here that a `-Syyu` is almost never required. So I have assumed that pacman caches the mirror URL and thus a simple `-Syu` suffices after editing the mirrorlist file. Is my assumption wrong?
Offline
depends on how broken your previous mirror was. If it served you up to date timestamps of the DB with the DB being out of date then doing -Syyu might be required, if it's "just a properly outdated" mirror then -Syu is sufficient, seeing as there hadn't been an update for a year anyway you'd have had to refresh all repos regardless the end effect will have been the same in this particular instance.
Last edited by V1del (2022-04-11 06:57:41)
Offline
It seems I should explain what I mean. I expect that pacman would always cache the last mirror URL from where the sync was done and thus pacman would force an update (effectively an automatic `-Syyu` when you do a `-Syu`) whenever that mirror URL is changed because you can never guarantee the state of the previous mirror. So is it the case that whenever you change your mirror then you should do an explicit `-Syyu`? If so then that is quite a common use case, and seems to undermine the "almost never required" edict.
Offline
mirror urls aren't cached, it reads them every time you run pacman. The timestamp of the local and remote (mirror) sync databases are what determines whether -y will download a new database file or keep it because it's already current. which exact url that file comes from is irrelevant.
Last edited by V1del (2022-04-11 09:03:44)
Offline
Pages: 1