You are not logged in.

#1 2018-01-08 05:25:17

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

[Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

I am using latest bootstrap. https://mirrors.kernel.org/archlinux/is … _64.tar.gz

When chroot and runing "pacman -S base base-devel --noconfirm", I get a bunch of systemd ldd errors.

"/usr/bin/systemd-tmpfiles: error while loading shared libraries: libjson-c.so.3: cannot open shared object file: No such file or directory"

Indeed, the libjson files put into /usr/lib are different.

/usr/lib/libjson-c.so
/usr/lib/libjson-c.so.2
/usr/lib/libjson-c.so.2.0.2

This is resolved if I run "pacman -S json-c --noconfirm" before installing base and base-devel.

pacman -S json-c --noconfirm
pacman -S base base-devel --noconfirm

Last edited by theonlylawislove (2018-01-12 07:16:44)

Offline

#2 2018-01-08 07:21:04

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

... or pacman -Syu


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-01-08 09:18:20

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

When chroot and runing "pacman -S base base-devel --noconfirm", I get a bunch of systemd ldd errors.

Of course, that is a partial update.

Why are you installing packages into the chroot environment?

Mod note: not an installation issue, moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2018-01-08 11:23:46

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

(Because the chroot environment is extremely minimal, containing only what is necessary to run pacman and install the missing pieces. Running `pacman -Syu base base-devel` in the bootstrap chroot is pretty normal.)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2018-01-08 12:07:11

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

I guess if you need to make a filesystem that isn't included (i.e. xfs or btrfs) and you don't have any other way to prepare the filesystem outside of the bootstrap chroot, installing packages in the bootstrap environment may well be the best solution. But this topic suggests to me that OP has either a) mistakenly used pacman instead of pacstrap, or b) is trying to build AUR packages in the bootstrap (in which case, just build them in the installed system chroot).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#6 2018-01-08 14:59:54

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

If I pacstrap /mnt base, can I arch-chroot into and install pacstrap base base-devel?

Offline

#7 2018-01-08 15:16:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

I think I'm really missing something here.  Why would you pacstrap just base to then try to install base-devel in the chroot?  You can install as much as you want with pacstrap, installing both base and base-devel is possibly more common that just base itself.

But as a direct answer to that question, no, because a base install doesn't include pacstrap; you'd need the install base and arch-install-scripts if you want pacstrap available in the chroot.

But again, pacstrap is to install packages into some other (future) system.  Unless you're trying to make multiple levels of nested archlinux chroots, using pacstrap from within the chroot just doesn't make any sense at all.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2018-01-08 15:18:12

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,721
Website

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

Assuming that /mnt is the partition you want to install Arch to, just run 'pacstrap /mnt base base-devel' initially, there's no need to call pacstrap twice, and no need to call it from the real root at all (there you can use pacman directly).

EDIT: snaked by Trilby

Last edited by WorMzy (2018-01-08 15:18:48)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2018-01-09 23:50:30

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

Is it not considered supported to entirely setup an Arch install through chroot?

Offline

#10 2018-01-10 08:40:10

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

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

It would be, but that mandates that you do it correctly. However I suspect we are in XY territory here.

What is your exact end goal? Why are the plethora of ways of either installing all necessary packages with pacstrap prior or doing the chroot but then properly running a system upgrade before attempting to further install packages with pacman, not sufficiently enough answering your question?

Offline

#11 2018-01-10 13:31:59

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

Forgive me, I'm trying to be straight and to the point here.

I am developing a stateless deployment system for myself. The idea is that if I ever need to change my OS, it goes into a script, and generates an entirely new operating system.

My "base install" is a clean bootstrap environment with nothing installed, not even "base" or "base-devel". However, this is mentioned here may require me to pacstrap base into the bootstrap to avoid this libjson issue. Anyways...

The idea is that I have scripts that are executed in a chroot enviroment to setup my OS. I chain scripts together with an overlayfs to generate "diffs" so that the scripts can inherit from each other, reducing build time. For example "base > develop-machine > kde" and "base > develep-machine > i3" would each share the single build output from "base > develop-machine".

So, here is my "base" script that all my images are based off on.

https://github.com/pauldotknopf/darch-i … ase/script

It works for the most part, but occassionally, the arch repos will have updates that cause it to not work. Sometimes the updates require me to just update bootstrap, which is fine. Sometimes they just will stop working (like this libjson error).

Each script is responsible for installing base and base-devel. However, with this issue of libjson, I think I am hearing that I MUST pacstrap base (not pacman -S from chroot). This is fine, I can make it so that all my scripts require "base" package group by installing it into the bootstrap (with pacstrap) before my first install script is run.

With that said, I want to be clear, what I mention below here is NOT considered to be supported, correct?

1. Extract bootstrap to directory.
2. Chroot into bootstrap (unchanged)
2. pacman -S base base-devel.

It would be, but that mandates that you do it correctly.

The steps above are correct? If so, I want to re-iterate that when i do them, I get the libjson error. So, maybe this is an actual issue?

Maybe I should skip the bootstrap, and just make my initial image myself with pacstrap?

Last edited by theonlylawislove (2018-01-10 13:36:01)

Offline

#12 2018-01-12 06:58:02

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

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

You make a new thread because you can't understand that partial updates are not supported! Read that as: never, ever run pacman -Sy.

Offline

#13 2018-01-12 07:12:04

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

I see. I did that because the bootstrap wouldn't "pacman -Syu" because the keyring had invalid keys. So, I had to download the database and install the new keyring before I could run "pacman -Syu". I didn't realize that was a partial update, just updating the database. I thought doing something like "pacman -S systemd" would be a partial upgrade, considering it actually installs something, and not just updates the local database.

Offline

#14 2018-01-12 07:12:58

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

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

But that's exactly what you're doing by running -S base after -Sy.

Offline

#15 2018-01-12 07:13:49

theonlylawislove
Member
Registered: 2015-01-05
Posts: 38

Re: [Solved] pacman -S base base-devel fails missing libjson-c.so.3 file

I see, thanks.

Offline

Board footer

Powered by FluxBB