Ubuntu "apt install borgmatic" installs version 1.7.9-0ubuntu1 #751
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#751
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
I'm trying to install borgmatic for the first time. I'm confused by the results of
sudo apt install borgmatic
as it installs an outdated version of the application.Steps to reproduce
sudo apt install borgmatic
Actual behavior
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
borgmatic is already the newest version (1.7.9-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Expected behavior
I would like to install the current version of borgmatic.
Other notes / implementation ideas
No response
borgmatic version
1.7.9
borgmatic installation method
sudo apt install borgmatic
Borg version
borg 1.2.4
Python version
Python 3.11.4
Database version (if applicable)
No response
Operating system and version
Ubuntu 23.04
Attempting a pip3 install doesn't seem to work either. I'm sure I've made some catastrophic mistake in setting up this system but this is the first package I've attempted to install that simply won't go for me!
Unfortunately, as you've discovered, Ubuntu packages an outdated version of borgmatic. You can try filing an Ubuntu ticket / contacting the Ubuntu borgmatic package maintainer to update it.. or you can try another installation method.
As for installing with pip, I'm not sure why you're getting the "This environment is externally managed" error when you've got the
--user
flag, which tells pip not to do a system-wide install. To make this work anyway though, you can either add the--break-system-packages
flag to your pip install (which hopefully won't break anything) and try again or you can create a virtualenv as per the instructions in that error message. A virtualenv is technically more isolated, so it's really a matter of what else you intend to install with pip in that particular user account and how much you care that it's isolated from borgmatic.Here's some more reading about potential solutions to the same problem you're having: https://askubuntu.com/questions/1465218/pip-error-on-ubuntu-externally-managed-environment-%C3%97-this-environment-is-extern
I hope some of this helps! I'm sorry that even just installing a recent version of borgmatic is such a hassle on your system.
I suspect my main sin was installing HomeBrew early in the build of this machine. At any rate, using that instead of
apt
orpip3
worked for me.Cool.. I didn't know Homebrew supported Ubuntu. I'm glad to hear you've got a recent version of borgmatic installed now. I'll close this ticket, but please feel free to file a new one if you have any other problems with borgmatic.
I believe this change is due to Debian implementing PEP 668. I've recently updated to Ubuntu 23.04, and had to learn venv to install borgmatic. Its been a bit of a headache (that's not a gripe at borgmatic maintainers).
I may open an issue to learn how to use venv borgmatic in cron job, since I haven't yet been able to make it work.
Edits: grammar, clarification
Thanks for providing that link. From that page, here is the rationale they give on this error also applying to the
pip install --user
use case:I guess a globally installed system package could in theory import something installed non-globally by
pip install --user
. Seems like an edge case, but okay. Maybe I need to change the recommended/default borgmatic install method from pip, although there aren't a lot of other good alternatives without the install instructions getting even more complicated—and therefore the chance of something going wrong increasing.I'm happy to look at a ticket about your cron job venv though!
Partly based on this ticket, I've updated borgmatic documentation to recommend installing borgmatic via pipx rather than pip:
That may also help with the cron job situation.