首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ubuntu 20.04上运行rdiff-备份版本1(比如1.2.8)

在Ubuntu 20.04上运行rdiff-备份版本1(比如1.2.8)
EN

Ask Ubuntu用户
提问于 2022-01-22 16:56:53
回答 1查看 479关注 0票数 1

我需要在Ubuntu20.04上运行rdiff备份版本1(比如1.2.8),这样Ubuntu20.04框就可以由遗留备份服务器备份。

我试图跟踪这里的帖子:https://askubuntu.com/a/1280195/1564231,但这给了我一个错误:

代码语言:javascript
复制
# 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

(我没有资格对这个答案发表评论)

因此,我试图找到并下载所需的特定包,我做到了:

代码语言:javascript
复制
# 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备份也做了同样的操作。

代码语言:javascript
复制
# 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

不太顺利,但现在已经安装了:

代码语言:javascript
复制
# rdiff-backup
bash: /usr/bin/rdiff-backup: /usr/bin/python: bad interpreter: No such file or directory

因此,建立替代方案:

代码语言:javascript
复制
# 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

以及:

代码语言:javascript
复制
# rdiff-backup --version
rdiff-backup 1.2.8

但是,这给我留下了一个问题,那就是,每当我尝试做其他事情时,都会有一个抱怨的问题:

代码语言:javascript
复制
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).

我应该早点做不同的事情吗?我能解决这个问题吗?

我做了一个

代码语言:javascript
复制
# apt-mark hold rdiff-backup

停止将rdiff升级到版本2。

非常感谢凯文

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2022-01-22 17:11:20

您必须首先使Ubuntu20.04LTS完全升级并保持正常。

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade

然后从18.04LTS存储库下载rdiff-backuplibrsync1包,通过

代码语言:javascript
复制
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

最后,将它们的版本保存在下面的命令中。

代码语言:javascript
复制
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
EOF
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1388614

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档