Debian bookworm can't install git

More
02 Dec 2023 11:09 - 02 Dec 2023 11:12 #287013 by 0jw
Hello, I'm hoping someone can help me. I can't install git on Debian 12 bookworm. I've been installing offline and then updating. I've tried editing the source list in Nano and synaptic, tried a fresh image, changing from Rufus to Unetbootin. nothing seems o work. any help is greatly appreciated!

sudo apt-get install git
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package git 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

E: Package 'git' has no installation candidate

 
Attachments:
Last edit: 02 Dec 2023 11:12 by 0jw.

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
02 Dec 2023 11:41 #287014 by rodw
Replied by rodw on topic Debian bookworm can't install git
I'm pretty sure if you install without an internet connection, the apt sources will not be set up correctly if you connect to the internet later. That means it is unable to get packages.

share the output of this command 
cat /etc/apt/sources.list

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
02 Dec 2023 13:45 #287023 by tommylight
Replied by tommylight on topic Debian bookworm can't install git

I'm pretty sure if you install without an internet connection, the apt sources will not be set up correctly if you connect to the internet later.

I always install with NO internet connection, it always works.
Did you do a
sudo apt update
before trying to install?

Please Log in or Create an account to join the conversation.

More
02 Dec 2023 14:12 #287025 by 0jw
Replied by 0jw on topic Debian bookworm can't install git
Yeah that's makes sense, but I'm not sure how to edit it.

cat /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20231016-21:54]/ bookworm contrib main non-free non-free-firmware

Please Log in or Create an account to join the conversation.

More
02 Dec 2023 14:28 #287026 by 0jw
Replied by 0jw on topic Debian bookworm can't install git
Yes, I used sudo apt get with the same results. the package manager repository is using some .io domains. nit sure if that matters

This is what I see in the package manager repository. but it doesn't match the sources.list. even after editing the sources.list I still the errors and some new ones.

deb packagecloud.io/rodw-au/rodw-au/debian/ bookworm main

deb-src packagecloud.io/rodw-au/rodw-au/debian/ bookworm main

deb www.linuxcnc.org/ bookworm 2.9-uspace

deb repository.qtpyvcp.com/apt/ develop main

deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20231016-21:54]/ bookworm non-free-firmware non-free main contrib

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
02 Dec 2023 18:07 #287036 by tommylight
Replied by tommylight on topic Debian bookworm can't install git
Sudo apt update

Please Log in or Create an account to join the conversation.

More
02 Dec 2023 18:26 #287041 by 0jw
Replied by 0jw on topic Debian bookworm can't install git
I definitely tried Sudo apt update. Maybe a better option is to install buster and upgrade it to bookworm instead. Could this be a root issue?

Please Log in or Create an account to join the conversation.

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
02 Dec 2023 18:59 - 02 Dec 2023 19:03 #287044 by rodw
Replied by rodw on topic Debian bookworm can't install git

Yeah that's makes sense, but I'm not sure how to edit it.

cat /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20231016-21:54]/ bookworm contrib main non-free non-free-firmware

Despite what Tommy thinks, you do need to have internet connection when running the installer. Otherwise, apt is set up to only get programs from your CD which you probably don't have. This is your issue.
edit your file as follows
sudo geany /etc/apt/sources.list

replace the contents with:
deb https://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
deb https://security.debian.org/ bookworm-security non-free contrib main non-free-firmware
deb https://deb.debian.org/debian/ bookworm-updates non-free contrib main non-free-firmware


then type
sudo apt update


Our installer follows best practice and adds all of the third party repositories (including linuxcnc) in other folders under the /etc/apt/ folder.
sources.list only contains the debian defaults which are set dynamically by the installer.[
Last edit: 02 Dec 2023 19:03 by rodw.

Please Log in or Create an account to join the conversation.

Time to create page: 0.216 seconds
Powered by Kunena Forum