
[Discussion] How can I download and compile the Debian source code?
[Discussion] How can I download and compile the Debian source code?
As I said, I want to download, edit and compile the Debian source code. But how can I do it? I know how to use terminal. 

Re: [Discussion] How can I download and compile the Debian source code?
Hi Akcaoren,
you can add some Source Repositories to your sources.list and download source package with:
Then you may modify the source and rebuild new packages.
See here for more details on rebuilding the debian packages:
https://www.debian.org/doc/manuals/main ... ld.en.html
Regards,
fx
you can add some Source Repositories to your sources.list and download source package with:
Code: Select all
apt-get source $PACKAGE_NAME
See here for more details on rebuilding the debian packages:
https://www.debian.org/doc/manuals/main ... ld.en.html
Regards,
fx
Last edited by fx919 on 2025-01-28 16:39, edited 1 time in total.
-
- Posts: 1801
- Joined: 2008-02-21 17:03
- Location: Finland
- Has thanked: 1 time
- Been thanked: 104 times
Re: [Discussion] How can I download and compile the Debian source code?
Hello and welcome!
Edit your /etc/apt/sources.list, and add deb-src to front of, like in the example below, where I have disabled the source line.
Then run sudo apt update.
After that you can download source for any packages
Compiling is an other issue, as Debian package source are c, python, perl, etc. c-sources can be compiled with g++. python is interpreted, so no compiltaion is needed.
Edit your /etc/apt/sources.list, and add deb-src to front of, like in the example below, where I have disabled the source line.
Code: Select all
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
After that you can download source for any packages
Code: Select all
sudo apt-get source [package name]