You are not logged in.

#1 2015-02-03 06:47:54

hermite
Member
Registered: 2015-02-03
Posts: 5

pacman "failed to commit transaction" error when installing arch

I'm installing arch following beginner's guide.
Following all the instructions, and after typing

# arch-chroot /mnt /bin/bash

, configuring other files, now I'm trying to install grub.
But when I type

# pacman -S grub

I always get error message like

error: could not prepare transaction
error: failed to commit transaction (conflicting files)
package: /path/to/file exists in filesystem
Errors occurred, no packages were upgraded.

and the package is not installed.
This problem occurs to every package, such as wifi-menu or dosfstools..
So I saw pacman wiki page, and found this error is from overwriting files,
and typing

# pacman -Syu --force grub

solves the problem. This installs packages successfully.

Does this problem occurs only to me?
And Is this right way to install packages using --force option?
Seeing the wiki page, I think that --force option is a bad one...

Last edited by hermite (2015-02-03 06:49:54)

Offline

#2 2015-02-03 07:26:00

MSC
Member
Registered: 2014-07-13
Posts: 33

Re: pacman "failed to commit transaction" error when installing arch

Did you erase the partition completely before running pacstrap? It sounds like there's already a linux installation on the disk, one that pacman does not recognize. You should not have to use --force unless you placed those files there yourself. It might help if you posted the specific file paths that are conflicting as well.

Offline

#3 2015-02-03 07:58:58

hermite
Member
Registered: 2015-02-03
Posts: 5

Re: pacman "failed to commit transaction" error when installing arch

MSC wrote:

Did you erase the partition completely before running pacstrap? It sounds like there's already a linux installation on the disk, one that pacman does not recognize. You should not have to use --force unless you placed those files there yourself. It might help if you posted the specific file paths that are conflicting as well.

Hmm.. I don't have my notebook now, so I can't check,
but how do I see what file path conflict when using pacman?



Additionally, I'm using windows 7 currently and trying to dual boot arch linux.
My plan for partition is

sda      4:0       128g           <- SSD
├─sda1   4:1    0   70g     0 part    <- windows 7 already installed.
├─sda2   4:2    0   4g       0 part    <- /swap
├─sda3   4:3    0   500m  0 part    <- /boot
├─sda4   4:4    0    40g    0 part    <- /, /usr, /usr/local, /opt
sdb      2:0       500g           <- HDD
├─sdb1   2:1    0   150g  0 part    <- windows D drive
├─sdb2   2:2    0   350g  0 part    <- /var, /home, /tmp

So during installtion, using cfdisk,
I made these partitions and typing

# mkfs.ext4          /dev/sda2
# mkfs.ext4          /dev/sda4
# mkfs.ext4          /dev/sdb2
# mkfs.vfat -F32   /dev/sda3

I formatted the disk. 
So I think there can't be any confling files for pacman...

Ah, and since that error occured continusly,
I tried to reinstall (shutdowning computer and reinstall from starting point)
many times.

Last edited by hermite (2015-02-03 08:02:16)

Offline

#4 2015-02-03 10:52:24

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: pacman "failed to commit transaction" error when installing arch

It looks like your computer is booting Windows in non-EFI mode -- that being the case, you probably shouldn't use FAT for the /boot partition (this is only necessary for booting in EFI-mode) as it is a rather fragile non-journalling filesystem; use EXT4 instead.

You can check the file path conflict by manually examining the file path given by pacman using `ls`
https://wiki.archlinux.org/index.php/Pa … 9.22_error

You should avoid using the `--force` flag with pacman unless you know exactly what you're doing -- it shouldn't ever be needed unless something has gone badly wrong (PEBKAC).

Have a read of this page:
https://wiki.archlinux.org/index.php/Pacman

Offline

Board footer

Powered by FluxBB