我需要在Ubuntu20.04上运行rdiff备份版本1(比如1.2.8),这样Ubuntu20.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备份也做了同样的操作。
# 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-mark hold rdiff-backup停止将rdiff升级到版本2。
非常感谢凯文
发布于 2022-01-22 17:11:20
您必须首先使Ubuntu20.04LTS完全升级并保持正常。
sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade然后从18.04LTS存储库下载rdiff-backup和librsync1包,通过
cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/r/rdiff-backup/rdiff-backup_1.2.8-7_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/main/libr/librsync/librsync1_0.9.7-10build1_amd64.deb
sudo apt-get install ./rdiff-backup_1.2.8-7_amd64.deb ./librsync1_0.9.7-10build1_amd64.deb最后,将它们的版本保存在下面的命令中。
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-rdiff-rsync
Package: rdiff-backup
Pin: version 1.2.8-7
Pin-Priority: 1337
Package: librsync1
Pin: version 0.9.7-10build1
Pin-Priority: 1337
EOFhttps://askubuntu.com/questions/1388614
复制相似问题