If you have newly installed debian or debian based system and getting error like "package vim is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source"

This is because that might be you have install debian with minimal installation process or the source package list is not globally configured. So we have to configure the source list file to tell the machine that here is the source url to install the packages we want.

For this just open the /etc/apt/source.list with the help of nano editor(nano is default text editor in debian) & add the line as shown below .
deb buster main contrib non-free
deb-src buster main contrib non-free
-In first line
>deb = binary packages
> = root address
>buster = code name of operating system
>main contrib non-free = package list types
you can replace the 'buster' code name with word 'stable'
deb stable main contrib non-free
-In Second line
It is just the source code of packages.

After that save the source.list file & just run the command 'apt update' and now you can install the packages from the source list you have configured.

You can add many package sources in your
source.list file but with caution

Below is the example picture or source.list file.

To learn more visit the official site Here

Post a Comment