Matt Jones Tech
  • Blog
  • Video Projects
  • Web Projects
  • Failed to Commit Transaction (Conflicting Files) Manjaro

    How to fix Failed to Commit Transaction (Conflicting Files) Error in Manjaro Linux

    This error is usually thrown after an attempted package upgrade using either pacman, the GUI, or another package manager. Below is an example of the error:

    This can happen with pretty much any package, depending on what else you’ve got installed on your system. Basically, pacman is saying it can’t go through with the upgrade because there are some conflicting files that exist on your machine that is preventing the upgrade from progressing any farther. Here’s what you can do to solve this.

    Step 1

    Check to see which package owns the file in question. You can do this by running pacman -Qo /path/to/the/file. If that prints out the name of a package, then you will have to decide whether or not to uninstall the package with the conflicting package by using sudo pacman -R nameOfThePackage.

    Step 2

    If the file in question is not owned by any package (as was the case for my situation), you can simply delete the file in conflict. You can do this by running sudo rm /path/to/the/file. Once the file has been removed, you’ll need to run the update process again to confirm that all the conflicting files in question have been resolved.

    To find out more about this issue and similar issue when updating packages, feel free to check out the pacman troubleshooting guide on the Manjaro wiki site.

    If you want to use the package manager to install DaVinci Resolve, check out this post

    matt

    May 5, 2020
    General Computing, Linux, Manjaro
    arch, linux, manjaro, package manager, troubleshooting
  • How to Fix Unable to Lock Database Error in Arch Linux

    How to Fix Unable to Lock Database

    When I try to update my machine by running sudo pacman -Syyu I get an error saying it’s unable to lock the database. Below is an example:

    But as you may have noticed, by removing a special database lock file, I was able to solve the issue. You can do this with sudo privileges by running:

    sudo rm /var/lib/pacman/db.lck

    The above method is dangerous

    I’ve done this before, and it’s worked perfectly fine with no issues. But the reason the db.lck file exists is to ensure that only one program can run updates at a time. This prevents partial updates, or interrupted updates, or conflicts, or any other problems that can occur when two programs try to do the same update at the same time.

    So before you go deleting your db.lck file like I did, do yourself a favor and make absolute certain that there are no other programs trying to update anything. You can use the lsof command to check what other programs are using the db.lck file. lsof is short for “list open files”.

    The lsof command will either return nothing or a single number. If it returns nothing, that means that no process is currently using that file. If it does return a number, then that is the ID of the process currently using that file. In order to delete the file safely, you’ll need to kill that process first. You can do that by running sudo kill -9 <process_id>

    Hope that helps! Please leave a comment below if you have any questions. You can find more information on using the command line, check out this awesome book called The Linux Command Line. It’s free!

    matt

    April 28, 2020
    General Computing, Linux, Manjaro
    arch, linux, manjaro, package manager, troubleshooting, ubuntu, update

Prove all things; hold fast that which is good. 1 Thess 5:21