我需要在 Ubuntu 20.04 上运行 rdiff-backup 版本 1(比如 1.2.8),以允许 Ubuntu 20.04 机器由旧备份服务器备份。
我试图在这里关注帖子: https ://askubuntu.com/a/1280195/1564231 ,但这给了我错误:
# apt install -y librsync1=0.9.7-10build1 rdiff-backup=1.2.8-7
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.9.7-10build1' for 'librsync1' was not found
(而且我没有评论该答案的声誉)
因此,我尝试查找并下载所需的特定软件包,我这样做了:
# wget http://cz.archive.ubuntu.com/ubuntu/pool/main/libr/librsync/librsync1_0.9.7-10build1_amd64.deb
# dpkg -i librsync1_0.9.7-10build1_amd64.deb
Selecting previously unselected package librsync1:amd64.
(Reading database ... 135179 files and directories currently installed.)
Preparing to unpack librsync1_0.9.7-10build1_amd64.deb ...
Unpacking librsync1:amd64 (0.9.7-10build1) ...
Setting up librsync1:amd64 (0.9.7-10build1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...
# dpkg -i rdiff_0.9.7-10build1_amd64.deb
(Reading database ... 135189 files and directories currently installed.)
Preparing to unpack rdiff_0.9.7-10build1_amd64.deb ...
Unpacking rdiff (0.9.7-10build1) over (0.9.7-10build1) ...
Setting up rdiff (0.9.7-10build1) ...
Processing triggers for man-db (2.9.1-1) ...
这似乎工作正常。所以我对 rdiff-backup 做了同样的事情
# dpkg -i rdiff-backup_1.2.8-7_amd64.deb
Selecting previously unselected package rdiff-backup.
(Reading database ... 135189 files and directories currently installed.)
Preparing to unpack rdiff-backup_1.2.8-7_amd64.deb ...
Unpacking rdiff-backup (1.2.8-7) ...
dpkg: dependency problems prevent configuration of rdiff-backup:
rdiff-backup depends on python (>= 2.7.1-0ubuntu2); however:
Package python is not installed.
rdiff-backup depends on python (<< 2.8); however:
Package python is not installed.
dpkg: error processing package rdiff-backup (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
rdiff-backup
效果不太好,但现在已安装:
# rdiff-backup
bash: /usr/bin/rdiff-backup: /usr/bin/python: bad interpreter: No such file or directory
所以设置替代方案:
# update-alternatives --install /usr/bin/python python /usr/bin/python2 1
update-alternatives: using /usr/bin/python2 to provide /usr/bin/python (python) in auto mode
# update-alternatives --install /usr/bin/python python /usr/bin/python3 2
update-alternatives: using /usr/bin/python3 to provide /usr/bin/python (python) in auto mode
# update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3 2 auto mode
1 /usr/bin/python2 1 manual mode
2 /usr/bin/python3 2 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/bin/python2 to provide /usr/bin/python (python) in manual mode
和:
# rdiff-backup --version
rdiff-backup 1.2.8
但是,每当我尝试做其他事情时,它给我留下了一个容易抱怨的问题:
root@tek:/usr/local/src/rdiff-backup# apt upgrade wget
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
rdiff-backup : Depends: python (>= 2.7.1-0ubuntu2)
Depends: python (< 2.8)
Recommends: python-pylibacl but it is not installed
Recommends: python-pyxattr
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
我应该早点做不同的事情吗?我可以解决apt问题吗?
我做了一个
# apt-mark hold rdiff-backup
停止将 rdiff 升级到版本 2。
非常感谢凯文