You are not logged in.

#1 2022-04-08 10:55:46

cjmurphy
Member
Registered: 2021-08-17
Posts: 5

Trying to install direnv

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

#2 2022-04-08 11:05:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Trying to install direnv

Post your pacman.conf and your mirrorlist.

Online

#3 2022-04-10 02:32:47

cjmurphy
Member
Registered: 2021-08-17
Posts: 5

Re: Trying to install direnv

## 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

#4 2022-04-10 02:42:28

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Trying to install direnv

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.

Online

#5 2022-04-11 04:28:27

cjmurphy
Member
Registered: 2021-08-17
Posts: 5

Re: Trying to install direnv

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

#6 2022-04-11 05:47:07

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: Trying to install direnv

cjmurphy wrote:

\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

#7 2022-04-11 06:57:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: Trying to install direnv

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

#8 2022-04-11 08:55:26

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 713

Re: Trying to install direnv

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

#9 2022-04-11 08:58:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,285

Re: Trying to install direnv

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

Board footer

Powered by FluxBB