Installing applications fails : Read-only filesystem

A lot of apps give this error while I try to install/build them with pamac.
Read-only filesystem

Helpful info:
I have 2 partitions: / and /home, owned by root and user.

Some example application that failed (there’s a lot more):
vscodium, mangohud

ln: failed to create symbolic link '/.nvm/nvm.sh': Read-only file system
==> ERROR: A failure occurred in build().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4

ls -la /.nvm

user@user:~$ ls -la /.nvm/
total 8
drwxr-xr-x  2 root root 4096 20 oct.  20:57 .

Welcome to the forum!

Could you please post the output of… :arrow_down:

mount | grep ro

This is all wrong. I don’t know what you are trying to do, but the root directory should never contain any dot files or dot directories.

user@user:~$ mount | grep ro

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxpro
to=5,direct,pipe_ino=12051)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,s
hortname=mixed,utf8,errors=remount-ro)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=
1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
kio-fuse on /run/user/1000/kio-fuse-nwJSns type fuse.kio-fuse (rw,nosuid,nodev,relatime,user_id=1000,gr
oup_id=1000)

Neither / nor /home are visible in that overview. Are you running from the live medium?

Thanks for the quick answers :slight_smile:
Just trying to figure out why I have these errors.

No, I’m not on a Live OS or anything.

I might have split my partitions in a bad way maybe ?

Never mind ─ for a moment I had overlooked that I asked you for a filtered output. The fact that neither / nor /home are listed there means that they’re not mounted read-only.

So then that begs the question, what filesystem are you trying to write to? Because if you were trying to write to /, then you would get an “Access denied” error, not a “Read-only filesystem” error.

But just as an aside, that /.nvm does not belong in the root directory.

I’m not actually quite sure,
I just ran sudo pamac install vscodium, or other applications

I tried to see if it was trying to access the root directory by manually creating the /.nvm/ folder, you can dismiss the info I gave on that ^^

vscodium is a package from the AUR. Therefore, the pamac subcommand is not install but build. :arrow_down:

pamac build vscodium

Also, you should not use pamac with sudo. It is polkit-aware and it will prompt you for a password when needed.

By the way, when pamac builds a package, it’ll normally use /tmp or /var/tmp as its temporary storage.

Another error of that type:

Creating default alias: default -> 16.9.1 (-> v16.9.1)
Running node v16.9.1 (npm v7.21.1)
npm ERR! code EROFS
npm ERR! syscall mkdir
npm ERR! path /.npm
npm ERR! errno EROFS
npm ERR! rofs Invalid response body while trying to fetch https://registry.npmjs.org/electron: EROFS: read-only file system, mkdir '/.npm'
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.
==> ERROR: A failure occurred in prepare().
    Aborting...
Finished with result: exit-code
Main processes terminated with: code=exited/status=4

Now I see why you have that /.npm in the root directory. npm should not be run with sudo either; it’s meant to be run as a regular user.

By the way, what filesystem type did you choose for your / and /home partitons?

I’m quite sure they are both ext4,

Seems to have worked when I removed sudo !
Was a stupid mistake ^^ Thanks

Okay ─ I was just making sure you hadn’t gone and done something fishy there. :wink:

So, I guess you have your answers. :arrow_down:

  1. You were using pamac wrongly.
  2. You were using npm wrongly.

:man_shrugging:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.