Matt Jones Tech
  • Blog
  • Video Projects
  • Web Projects
  • Arch Failed To Commit Transaction (Invalid or corrupted package)

    Long story short, this error popped up when I was running an update in Manjaro using the Add/Remove Software program. As a result, the in-progress update failed, and I wasn’t able to get past it. Even after restarting my computer, restarting Add/Remove Software, I still ran into the same error. After some research, I discovered that apparently, somewhere along the way, one of my updates had gotten interrupted. (Which makes sense when your two year old son just goes around pushing the hard reset button (conveniently?) located on the front of my tower… or the glowing blue power button on my UPS… you get the idea.) So yeah, there was a solid chance a process or two was interrupted. Because of that interruption, there was a temporary file left in my pacman cache. Removing this incomplete temp file was solved as soon as that file was removed and the update was restarted.

    Solved error with sudo rm /var/cache/pacman/pkg/*.part

    Just as a side note, there is a similar error covered on my blog where Arch fails to build Nettle6

    matt

    January 15, 2021
    Uncategorized
    arch, linux, manjaro, package manager
  • Failed to Build Nettle6

    Hey guys, I was trying to build a copy of Local by Flywheel on Manjaro Linux, but ran into this error… ‘ Failed to build nettle6 ‘

    failed to build nettle6

    nettle6 is a dependency of Local, but after the attempted build of the package, I got the error failed to build nettle6 :

    ==> Verifying source file signatures with gpg...
        nettle-3.4.1.tar.gz ... FAILED (unknown public key F3599FF828C67298)
    ==> ERROR: One or more PGP signatures could not be verified!
    Failed to build nettle6

    If you happen to come across this error, just double check the key by running

    gpg --recv-key F3599FF828C67298

    Just plug in the gpg key from the error at the end of your gpg --recv-key call.

    In my case, that didn’t work. The resulting output was:

    ~ >>> gpg --recv-key F3599FF828C67298                                          
    gpg: keyserver receive failed: General error
    ~ >>>     

    If you’re like me and the key validation still fails, you can try a different key from another server using the --keyserver flag. For example:

    gpg --keyserver pool.sks-keyservers.net --recv-key F3599FF828C67298

    In my case, it shows that the new key was successfully imported.

    ~ >>> gpg --keyserver pool.sks-keyservers.net --recv-key F3599FF828C67298   [2]
    gpg: key F3599FF828C67298: public key "Niels Möller <[email protected]>" imported
    gpg: Total number processed: 1
    gpg:               imported: 1
    ~ >>>                                                                          

    Now, when I run the nettle6 package build again… it works! Hope this helps. There’s a great resource on this on the Manjaro forums.

    Again, this is a very specific error and solution, and it just so happened that I was having trouble with my gpg keys. This may not be the case for everyone, but I hope this article is helpful to you.

    matt

    September 21, 2020
    Linux
    arch, linux, manjaro, package manager
  • 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
  • Locate Files using Terminal

    Let’s locate files using the terminal! This is just a cool little trick you can use if you’re doing a bunch of stuff in the terminal, and you don’t want to leave, or you’re just interested in cool terminal tricks. Let’s say you’re looking for a file, anywhere on your machine, but you don’t know exactly where it is. You can install a very cool search package called mlocate (or merging locate).

    Install

    On Ubuntu/Debian you can run:

    sudo apt-get install mlocate

    Or if you’re on that Manjaro/Arch life:

    sudo pacman -S mlocate

    Syntax

    To locate files in the terminal by using mlocate, just type:

    locate [name of the file] [directory in which you want to start recursively searching]

    If you’re using mlocate for the first time, it’s not gonna work just yet. mlocate is actually a pair of tool bundled into one. The other half of mlocate is called updatedb. So by running updatedb, you’re essentially creating/updating an index so that you can run your search. So any time you want to run a locate command and it’s not giving you the results you are expecting, there’s a good chance your index is outdated, so you can just run updatedb, then run your locate search again, and you should be good to go.

    Update your junk by running updatedb then run locate [file] to get your mind blown!

    Bonus Tip

    If the results of your locate command are crazy long, like… CRAZY long…. too long to view everything in the terminal because your terminal only has a finite history, here’s a tip: You can print the results of ANY command to a text file and save it anywhere by using >. For example:

    sudo locate myfile.txt / > ~/Desktop/searchresults.txt

    The above command will run a system-wide search for anything matching myfile.txt recursively from the root directory / and print the results to searchresults.txt on the Desktop.

    Good luck and have fun! Now that you’ve found the file you’re looking for, perhaps you want to do something cool with it! If you wanna learn more cool stuff you can do in the terminal, check this out.

    matt

    September 23, 2019
    General Computing, Linux, Ubuntu
    arch, command line, debian, linux, manjaro, search, terminal, ubuntu

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