apt install fails to locate a package that apt-cache search can find

Hello,

I am running Kali Linux and am having a problem with my package manager (apt). I am trying to install the Sinhala language pack, but every attempt fails, even when apt-cache search shows that the package exists.

Here are the steps I have taken:

  1. I first tried to install common package names, like language-pack-si and language-pack-gnome-si. All of them failed with the error: Error: Package has no installation candidate
  2. Next, to find the correct package name on my system, I ran a search: apt-cache search sinhala
  3. This search was successful and showed a list of packages, including one that seemed correct: task-sinhala-desktop-gnome.
  4. However, when I tried to install that exact package, it failed: sudo apt install task-sinhala-desktop-gnome

This final command produced the error: E: Unable to locate package task-sinhala-desktop-gnome

My main question is: Why would apt-cache search be able to find the package in the list, but apt install is unable to locate it? I have already run sudo apt update multiple times. It seems like there is a deeper problem with my package manager’s configuration.

Could you please help me diagnose and fix this apt issue?

Thank you for your time.


looks like the packages you mentioned are not in the repos. you can verify it at : pkg.kali.org

instead of specifying a gnome desktop version, try:

sudo apt-get install task-sinhala-desktop

you may then have to run this to make gnome pick it up through ibus which it uses for langauge specific items:

gnome-initial-setup