Kali Linux: Update Issue with VS Code Kalipkg - Fixed!
In this article, we will discuss the recent update issue faced by Kali Linux users who installed VS Code via the kalipkg package manager. This issue was reported on various forums, and we will provide a solution for it. We will cover key concepts related to Kali Linux, VS Code, and package managers, and provide detailed context and subtitles throughout the article.
Background
Kali Linux is a popular Linux distribution for ethical hacking and penetration testing. It comes with hundreds of pre-installed tools for security testing and auditing. VS Code is a popular code editor developed by Microsoft and is widely used for software development, debugging, and testing. The Kali Linux team developed a package called kalipkg to easily install VS Code on Kali Linux.
Issue: APT Update Output
A Kali Linux user recently reported facing the following output when running apt update:
Hit:1 https://http.kali.org/kali kali-rolling InRelease
Get:2 https://packages.microsoft.com/repos/vscode stable InRelease [5,223 B]
Hit:3 https://security.kali.org/kali-security kali-security InRelease
Hit:4 https://archive.kali.org/kali kali-last-snapshots InRelease
Ign:5 https://download.vlsi.ac.in/vscode vscode InRelease
Ign:6 https://update.code.visualstudio.com/latest/deb stable InRelease
Err:7 https://download.vlsi.ac.in/vscode vscode Release
404 Not Found [IP: 144.91.112.143 443]
Err:8 https://update.code.visualstudio.com/latest/deb stable Release
404 Not Found [IP: 13.107.21.221 443]
Reading package lists... Done
W: The repository 'https://download.vlsi.ac.in/vscode vscode Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://update.code.visualstudio.com/latest/deb stable Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
This issue occurred because the repositories https://download.vlsi.ac.in/vscode and https://update.code.visualstudio.com/latest/deb did not have a Release file. This file is required to securely update from the repository. As a result, the kalipkg package manager was not able to update the VS Code packages properly.
Solution: Fixing the Issue
To fix this issue, we need to remove the incorrect repositories and add the correct ones. You can follow these steps:
- Open the terminal on your Kali Linux machine.
- Run the following command to remove the incorrect repositories:
sudo sed -i '/https:\/\/download.vlsi.ac.in\/vscode/d' /etc/apt/sources.list
sudo sed -i '/https:\/\/update.code.visualstudio.com\/latest\/deb/d' /etc/apt/sources.list
- Add the correct repositories using the following commands:
curl -sS https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key
addlead -y
curl -sS https://packages.microsoft.com/repos/vscode/pool/main/v/vs-code/vs-code_1.76.2-1682118312_amd64.deb > /tmp/vs-code.deb
sudo dpkg -i /tmp/vs-code.deb
These commands will add the official VS Code repository by Microsoft and install the latest version of VS Code.
In this article, we discussed the recent update issue faced by Kali Linux users who installed VS Code via the kalipkg package manager. This issue occurred because the repositories did not have a Release file, which is required for secure updates. To fix this issue, we removed the incorrect repositories and added the correct ones by using the official VS Code repository by Microsoft. This solution ensured that the VS Code packages were updated properly and securely.
References
- Kali Linux: https://www.kali.org/
- VS Code: https://code.visualstudio.com/
- Kali Linux Package Manager: https://www.kali.org/docs/general-use/kali-linux-package-management/
- VS Code Repository by Microsoft: https://packages.microsoft.com/