You are not logged in.

#1 2017-12-06 13:05:20

cmmps
Member
From: Portugal, Lisbon
Registered: 2012-04-26
Posts: 70

[Solved] Error installing packages from ALA in "chrooted" environment

Hello!

I'm creating a "chroot" environment with "mkarchroot" to install an older snapshot of Arch Linux (from ALA) and gcc.
It happens that the newer versions of gcc are giving me errors during compilation of a big and old project, so I decided to create this isolated build environment to compile with an older gcc version.

But after installing and downgrading the packages, within the chrooted environment, I'm no longer able to install more packages there! The file /etc/ssl/certs/ca-certificates.crt is missing!

Here are the steps I followed:

# mkarchroot /mnt/chroot base

# echo 'Server = https://archive.archlinux.org/repos/2016/12/31/$repo/os/$arch' > mnt/chroot/etc/pacman.d/mirrorlist

# arch-chroot mnt/chroot /bin/bash

# pacman -Rncs linux linux-firmware systemd

# pacman -Syyuu

# pacman -S mercurial unzip wget cpio
resolving dependencies...
looking for conflicting packages...

Packages (5) python2-2.7.13-1  cpio-2.12-3  mercurial-4.0.1-1  unzip-6.0-12  wget-1.18-3

Total Download Size:   14.42 MiB
Total Installed Size:  92.28 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
error: failed retrieving file 'python2-2.7.13-1-x86_64.pkg.tar.xz' from archive.archlinux.org : error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
warning: failed to retrieve some files
error: failed retrieving file 'mercurial-4.0.1-1-x86_64.pkg.tar.xz' from archive.archlinux.org : error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
warning: failed to retrieve some files
error: failed retrieving file 'unzip-6.0-12-x86_64.pkg.tar.xz' from archive.archlinux.org : error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
warning: failed to retrieve some files
error: failed retrieving file 'wget-1.18-3-x86_64.pkg.tar.xz' from archive.archlinux.org : error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
warning: failed to retrieve some files
error: failed retrieving file 'cpio-2.12-3-x86_64.pkg.tar.xz' from archive.archlinux.org : error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
warning: failed to retrieve some files
error: failed to commit transaction (download library error)
Errors occurred, no packages were upgraded.

Any suggestions?

Thank you in advance.

Last edited by cmmps (2017-12-06 15:37:55)


Carlos Santos

Offline

#2 2017-12-06 13:34:32

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: [Solved] Error installing packages from ALA in "chrooted" environment

Maybe pacman.conf/SigLevel=Never.
https://www.archlinux.org/pacman/pacman.conf.5.html


sys2064

Offline

#3 2017-12-06 13:42:28

robt77
Member
From: Manchester
Registered: 2014-10-26
Posts: 21
Website

Re: [Solved] Error installing packages from ALA in "chrooted" environment

There was a change in the ca-sertificates in the March 2017 update.  How old is the snap shot?

https://www.archlinux.org/news/ca-certi … ervention/

Offline

#4 2017-12-06 14:24:46

cmmps
Member
From: Portugal, Lisbon
Registered: 2012-04-26
Posts: 70

Re: [Solved] Error installing packages from ALA in "chrooted" environment

Thank you all.

Maybe pacman.conf/SigLevel=Never.

Didn't work... sad

There was a change in the ca-sertificates in the March 2017 update.  How old is the snap shot?

Aaaaah... Yes, I remember that! Damn it... 2016/12/31... About one year old.
Is there any workaround? I could try a more recent snapshot and then downgrade other packages... But I first tried with even an older snapshot to avoid downgrading packages after having the snapshot.

Regards.


Carlos Santos

Offline

#5 2017-12-06 15:00:30

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

Re: [Solved] Error installing packages from ALA in "chrooted" environment

This is an xy problem (http://mywiki.wooledge.org/XyProblem)

Using a build env from a year ago is the wrong way to go about this. If it doesn't build with newer gcc, use a different gcc package. gcc6 is in Community, and gcc5 is in the AUR.

Last edited by Scimmia (2017-12-06 15:03:32)

Offline

#6 2017-12-06 15:22:13

cmmps
Member
From: Portugal, Lisbon
Registered: 2012-04-26
Posts: 70

Re: [Solved] Error installing packages from ALA in "chrooted" environment

Hum... I didn't know that there was a gcc6. It may work. I know the the best way to compile without problems is by using version 4.8 but I know that some of my colleagues were able to compile with version 6 and 5 as well.
It would be better, indeed. Thanks!
I'm going to try it. smile


Carlos Santos

Offline

#7 2017-12-06 15:37:40

cmmps
Member
From: Portugal, Lisbon
Registered: 2012-04-26
Posts: 70

Re: [Solved] Error installing packages from ALA in "chrooted" environment

Yes! It works! Installing gcc6 and replacing gcc to gcc-6 and g++ to g++-6 solved my problem!
Thanks a lot.

Regarding the chroot environment, is now clear that installing any snapshot dated before March 2017 and the ca certificates changes will break pacman.

Marking as solved.

Thank you all.


Carlos Santos

Offline

Board footer

Powered by FluxBB