Apt-Get Install Fails with Err1 & 404 Not Found Error
After firing up an old Kali Linux VM and trying to update a software package, I discovered that Kali Linux would not install any new packages nor would it install the latest Operating System update.
I kept getting an error, Err1, and a HTTP 404 Not Found saying it was failing to fetch the packages or updates.
Below are screenshots of the first error I saw when running apt-get install sshpass.
Apt-Get Update Error
I also got a different error when I tried to run apt-get update. This time the error references an invalid signature.
Fix for Kali Linux Invalid Signature Error
The invalid signature in the error was ED444FF07D8D0BF6, we’ll only need the last part, 7D8D0BF6 for our command.
The key server reference is one I had found on an article on the internet but apparently there are other key servers you can reference as well.
To fix the Invalid Signature error, we’ll have to enter the following command. As of this writing, this command worked for me if entered verbatim.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $key
WHAT I ACTUALLY RAN:
root@kali:/etc/apt# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6
Executing: /tmp/apt-key-gpghome.a5zcatYyQB/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6
gpg: key ED444FF07D8D0BF6: 22 duplicate signatures removed
gpg: key ED444FF07D8D0BF6: 223 signatures not checked due to missing keys
gpg: key ED444FF07D8D0BF6: "Kali Linux Repository <email@example.com>" 238 new signatures
gpg: Total number processed: 1
gpg: new signatures: 238
Video: Kali Linux Signature Error Fix
Other Helpful Kali Linux References
In the steps above I kind of gloss over some technical parts.
One of those topics was Kali Linux repositories. I’m not an expert on it but know it was important part of troubleshooting and solving my problem. Basically knowing enough to know that was not my issue so I could rule it out.
If you have questions about or just want to dive in to the topic of repositories follow the link below. The page addresses items people frequently get wrong as it can be a bit confusing.
The Master Lock Fortress is a disc type padlock commonly found in many facilities. Often, people may think the name “Fortress” implies that this lock is extra secure but in the end it is just a marketing ploy.
The Secret to Picking the Master Lock Fortress
In my video below, I’ll show you my secret to picking the Master Lock Fortress by focusing on a combination of a pin in very back of the keyway and the correct tension on your tensioning device of choice.
I’m cutting myself some slack for doing this on camera which is a bit more challenging. My claim of picking this lock in 30 seconds starts from from after resetting my first attempt.
Video: My Secrets to Picking the Master Lock Fortress in 30 Seconds
The biggest problem working on Arduinos is that they are more or less experimental and finding drivers and software packages can be quite challenging. Often, it becomes the most time consuming part of any Arduino project.
Arduino TFT LCDs
Recently, I’ve started experimenting with Arduino TFT LCDs and what a joy it is to find all the missing libraries and “How-To” resources to pull this off.
I’m posting this information because it helped me with the issue I was having.
Sometimes it is not just the drivers, but the software to makes Arduino hardware run that often sends you down the rabbit hole. Often, you’ll spend hours troubleshooting your project over a code bug but never being 100% sure you hardware isn’t failing.
Once I finally found the right drivers and a couple of code tweaks, I finally got the 2.4 inch TFT LCD to work a bit and even a drawing app that let you draw with your finger or stylus.
Backward Engineering a File Parsing MicroORM Solution
I love my work!
I’m given application code I’ve never seen and in a language I don’t code in often enough and asked to figure it out.
Luckily, I have access to business analysts and a DBAs to get details about the business processes and databases the code is related to.
From code and info resources, create working test environment and get familiar enough with application code and databases to have new updates in to production in 2-3 weeks.
No pressure, right?
I was fairly successful today and here are some of the resources that used to solve problems I encountered.
It’s a small MicroORM based on the Expando or dynamic type and allows you to work with your database with almost no effort. The design is based on the idea that the code provided to you in this repository is a start: you get up and running in no-time and from there edit and alter it as you see fit.
I searched all over and did not find the right answer so I played around until I had found it myself and now I’ll share it with you.
I had picked up a VBA coding project from a contractor who was leaving. The application takes a bunch of Excel data in various complex formats and creates a comma separated value file (CSV) as output that are used for import into a custom object in Salesforce.
The application takes a bunch of Excel data in various complex formats and creates a comma separated value file (CSV) as output that are used for import into a custom object in Salesforce.
One of the issues the customer was reporting was that they had an expectation that currency value in exported CSV files should retain the 2 digits after the decimal point.
The application was sending the output result in a CSV file but the currency value were only retaining one digit after the decimal if the last decimal was a zero.
A value of 91.20 is coming out as 91.2, missing the 2nd digit.
This happens consistently while using Excel with CSV files but not with XLS. It drops the zero every time.
How to Save currency values in a CSV File using Microsoft Excel
Save your CSV file in MS Excel format with a .xlsx or .xls extension.
Update the “Format Cells” to display the column as Currency. I set the option not to display a $ for currency and 2 digits after the decimal point.
Save this file with a .CSV extension. Your currency values with the 2 digits after the decimal point are preserved during this conversion.
That is it!
To validate it, open the CSV file with a text editor like Notepad or Notepad++ and you will see the number format with 2 digits after the decimal was retained.
Watch out! If you open the CSV file with MS Excel and save it again as CSV, Excel will wipe out your currency formatting.