Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

"Permission denied" when emerging some packages

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
16 posts • Page 1 of 1
Author
Message
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

"Permission denied" when emerging some packages

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 1:33 pm

Hi,
So, I just installed gentoo on my systems and I managed to boot into a cli, with systemd.
But, now I have some problems installing packages.
It all began before finishing installation, in the part where I needed to configure GRUB, I tried to install it, but it failed with an error about the package pulseaudio, it failed to unpack it. It outputed many "permission denied" errors and "No such file or directory" . I bypassed this error by telling it to compile grub without pulseaudio (Maybe it wasn't a good idea). (I don't have the output of it here, but I have a similar output hereafter)

Now I tried to install GNOME and I got a very similar error with the package "keyutils".

Code: Select all

 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
>>> Unpacking source...
>>> Unpacking keyutils-1.6.1.tar.gz to /var/tmp/portage/sys-apps/keyutils-1.6.1/work
tar: keyutils-1.6.1/.gitignore: Cannot open: Permission denied
tar: keyutils-1.6.1/LICENCE.GPL: Cannot open: Permission denied
tar: keyutils-1.6.1/LICENCE.LGPL: Cannot open: Permission denied
tar: keyutils-1.6.1/Makefile: Cannot open: Permission denied
tar: keyutils-1.6.1/README: Cannot open: Permission denied
tar: keyutils-1.6.1/SUBMITTING_PATCHES: Cannot open: Permission denied
tar: keyutils-1.6.1/dns.afsdb.c: Cannot open: Permission denied
tar: keyutils-1.6.1/key.dns.h: Cannot open: Permission denied
tar: keyutils-1.6.1/key.dns_resolver.c: Cannot open: Permission denied
tar: keyutils-1.6.1/keyctl.c: Cannot open: Permission denied
tar: keyutils-1.6.1/keyutils.c: Cannot open: Permission denied
tar: keyutils-1.6.1/keyutils.h: Cannot open: Permission denied
tar: keyutils-1.6.1/keyutils.spec: Cannot open: Permission denied
tar: keyutils-1.6.1/libkeyutils.pc.in: Cannot open: Permission denied
tar: keyutils-1.6.1/man: Cannot mkdir: Permission denied
tar: keyutils-1.6.1/man: Cannot mkdir: Permission denied
tar: keyutils-1.6.1/man/asymmetric-key.7: Cannot open: No such file or directory
tar: keyutils-1.6.1/man: Cannot mkdir: Permission denied
.
.
.
And it goes on for a long list of denied permissions.
I tried to chown the directories there to be owned by portage, I even tried to manually extract the .tar.xz files there and then chowning it, but emerge will just delete them, and (fail to) extract them again. Couldn't find in the wiki/forums why this will happen. Anyone know how to fix it?
(Note: this doesn't happen with all packages, for now just with those two)

Thanks!
Top
fturco
Veteran
Veteran
Posts: 1181
Joined: Wed Dec 08, 2010 8:38 pm

  • Quote

Post by fturco » Sat Jun 27, 2020 2:11 pm

Welcome to the Gentoo forums!
ctm-8400 wrote:I bypassed this error by telling it to compile grub without pulseaudio (Maybe it wasn't a good idea).
GRUB is a bootloader and it doesn't need an audio system like pulseaudio. In fact the package sys-boot/grub doesn't even have a pulseaudio USE flag.

The following warning lacks context for us to understand, but may be important for the problem at hand:
ctm-8400 wrote:

Code: Select all

 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
I suggest to install the app-text/wgetpaste package.
You can then paste the build logs for problematic packages (such as keyutils).
Logs are placed in the /var/log/portage directory.
See the Gentoo wiki article about wgetpaste for more details.

It would be nice to have the output of emerge --info, too:

Code: Select all

wgetpaste -c "emerge --info sys-apps/keyutils"
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 2:40 pm

I don't think this is relevant but the full warning:

Code: Select all

 
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
 * keyutils-1.6.1.tar.gz BLAKE2B SHA512 size ;-) ...                     [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     5.8.0-rc2
 * Checking for suitable kernel configuration options...
 *  You will be unable to use Diffie-Hellman on this system because CONFIG_KEY_DH_OPERATIONS is not set!
* Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
I installed grub:2, and for some reason it did try to install pulseaudio, don't know why.

this is what I got from

Code: Select all

emerge --info sys-apps/keyutils
http://dpaste.com/0RF5HN9
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Sat Jun 27, 2020 3:09 pm

"emerge --info" tells us that you are running a 5.0.0-32-generic x86_64 kernel and /usr/src/linux seems to be a 5.8.0-rc2 kernel?
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 3:13 pm

Oh, probably because I ran it in a chrooted enviorment? I didn't think it matters.

Same thing happended when booting directly to it, I'll try to run it again this way and post the log here.
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 3:23 pm

Ok, so here is the link:

http://dpaste.com/3ZBXGQ5

Yeah, it is 5.8-rc2 as it should be.

I'm pretty sure its a simpler issue though, it feels like something that can be solved by changing groups and ownership of stuff... no?
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Sat Jun 27, 2020 3:40 pm

ctm-8400 wrote:I'm pretty sure its a simpler issue though, it feels like something that can be solved by changing groups and ownership of stuff... no?
The error you reported is highly unusual. I've never seen it before. I tried to reproduce it, but I can't. This tells me that something must be fundamentally broken on your machine.

It's difficult to say what it is. It's probably not the kernel. On the other hand, it's also unusual for new users to mess around with bleeding edge kernels like 5.8-rc2 - I would have expected a stable kernel like 5.4.49 or similar...

I don't see anything wrong in the output of 'emerge --info'.

Please tell us what you are doing. Are you still in the process of installing Gentoo Linux? Or do you have a machine that worked before and now shows the error messages? Do you have any idea what could have gone wrong?
Top
fturco
Veteran
Veteran
Posts: 1181
Joined: Wed Dec 08, 2010 8:38 pm

  • Quote

Post by fturco » Sat Jun 27, 2020 3:51 pm

ctm-8400 wrote:I'm pretty sure its a simpler issue though, it feels like something that can be solved by changing groups and ownership of stuff... no?
On my system:

Code: Select all

$ ls -ld /var/tmp
drwxrwxrwt 6 root root 4096 Jun 26 11:57 /var/tmp

$ ls -ld /var/tmp/portage
drwxrwxr-x 3 portage portage 4096 Jun 27 09:06 /var/tmp/portage
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 3:52 pm

Ok, I followed the handbook and:

1. I installed Gentoo successfully.
2. I came to the point where you need to reboot, so I did.
3. It booted to a cli (I guess it should as I didn't install GNOME yet).
4. I tried to run `emerge gnome-base/gnome`.
5. The error above happened.
fturco wrote:
ctm-8400 wrote:I'm pretty sure its a simpler issue though, it feels like something that can be solved by changing groups and ownership of stuff... no?
On my system:

Code: Select all

$ ls -ld /var/tmp
drwxrwxrwt 6 root root 4096 Jun 26 11:57 /var/tmp

$ ls -ld /var/tmp/portage
drwxrwxr-x 3 portage portage 4096 Jun 27 09:06 /var/tmp/portage
Same on my system

However I do get:

Code: Select all

$ ls -ld /var/tmp/portage/sys-apps/keyutils-1.6.1/work/keyutils-1.6.1
drwxr-xr-x 2 root root 4096 Jun 27 17:33 /var/tmp/portage/sys-apps/keyutils-1.6.1/work/keyutils-1.6.1
Is it ok?
Top
fturco
Veteran
Veteran
Posts: 1181
Joined: Wed Dec 08, 2010 8:38 pm

  • Quote

Post by fturco » Sat Jun 27, 2020 4:01 pm

Are you using sys-kernel/gentoo-sources for the kernel? If so, did you enable the CONFIG_GENTOO_LINUX kernel option?
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 4:05 pm

fturco wrote:Are you using sys-kernel/gentoo-sources for the kernel? If so, did you enable the CONFIG_GENTOO_LINUX kernel option?
No, I used sys-kernel/git-sources, and I didn't enable this option.
Top
fturco
Veteran
Veteran
Posts: 1181
Joined: Wed Dec 08, 2010 8:38 pm

  • Quote

Post by fturco » Sat Jun 27, 2020 4:22 pm

Which kind of filesystem does /var/tmp/portage use? Did you try to check its integrity (for example with fsck.ext4 when using the ext4 filesystem)?
Please also paste the output of the mount command.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jun 27, 2020 5:21 pm

Your prompt shows $, but # is more traditional for root. You are running emerge as root, correct?
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sat Jun 27, 2020 7:39 pm

fturco wrote:Which kind of filesystem does /var/tmp/portage use? Did you try to check its integrity (for example with fsck.ext4 when using the ext4 filesystem)?
Please also paste the output of the mount command.
ext4, fsck didn't return any errors. (I'll post mount results later)
Hu wrote:Your prompt shows $, but # is more traditional for root. You are running emerge as root, correct?
I ran --info as user, but when trying to install I either use sudo or just run it as root.
Top
Ionen
Developer
Developer
User avatar
Posts: 3013
Joined: Thu Dec 06, 2018 2:23 pm

  • Quote

Post by Ionen » Sat Jun 27, 2020 8:54 pm

Does the problem still exist if you sync your portage tree? I'm pretty sure it should be fixed. Was [bug=729178]bug #729178[/bug] which affects any package using linux-info.eclass like keyutils does, so there's nothing strange with your system.

Edit: looking at your emerge --info, you sync'ed 2 hours before the fix, unfortunate timing :( Issue was somewhat short lived and hard to find so I can't blame people in the thread for not knowing about it.
Top
ctm-8400
n00b
n00b
Posts: 42
Joined: Sat Jun 27, 2020 1:16 pm

  • Quote

Post by ctm-8400 » Sun Jun 28, 2020 12:31 pm

Oh, OK, it is probably it, I'll look into it soon.
Thanks for the help!

Edit: Yeah that fixed it, thank you! :)
Top
Post Reply

16 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic