3

How can I install ddrescue for Ubuntu 20.04?

Parto
  • 15,027
  • 24
  • 86
  • 114
wst
  • 87
  • 1
  • 1
  • 6
  • Ubuntu releases use a *year.month* format, and there is no 20th month, so please clarify your release of Ubuntu. – guiverc Jun 17 '20 at 08:00

2 Answers2

4

To install GNU ddrescue command-line tool in all currently supported versions of Ubuntu open the terminal and type:

sudo apt update  
sudo apt install gddrescue

The gddrescue tool copies data from one file or block device (hard disk, CD-ROM, etc.) to another, trying hard to rescue data in case of read errors.

karel
  • 110,292
  • 102
  • 269
  • 299
  • Out of the box it will not work because the package is in universe (packages.ubuntu.com/focal/gddrescue). You have to enable universe first if you haven't done that: `sudo add-apt-repository universe` (linuxconfig.org/…) otherwise you will get an error such as "Package 'gddrescue' has no installation candidate" (or "Depends: gddrescue but it is not installable " for ddrescue-gui). After enabling universe, installing gddrecue (or installing ddrescue-gui after adding the ppa in wst's answer) works. – Poikilos Nov 10 '20 at 23:03
  • Would you mind sharing more information about how to obtain this package without using `apt`? i.e. I have no network connectivity so want to find the `.deb` and run `dpkg -i gddrescue.deb` or something like that. – jacobq Dec 31 '20 at 14:35
  • Found it here --> https://packages.ubuntu.com/focal/gddrescue – jacobq Dec 31 '20 at 14:38
  • @jacobq To install gddrescue_1.23-2build1_amd64.deb and its dependencies, open the terminal, change directories with `cd` to the directory containing ddrescue_1.23-2build1_amd64.deb and run `sudo apt install ./gddrescue_1.23-2build1_amd64.deb` – karel Dec 31 '20 at 14:57
  • @karel Yes, once you have the package that works (as does `dpkg -i ...` as I mentioned). I was looking for where to find the package (then edited comment once I found it). – jacobq Jan 06 '21 at 16:57
  • @jacobq gddrescue is a command-line tool. It is started from the terminal with the command `gddrescue`. – karel Jan 06 '21 at 20:37
  • @karel I am well acquainted with the tool. I was asking about where to manually download the .deb file for offline installation (on a system that does not have gddrescue installed and does not have network connectivity to the Internet). You can disregard. I found the URL I was looking for and posted above. – jacobq Jan 08 '21 at 20:06
3

Found this guide for Ubuntu 18.04, but it also works for Ubuntu 20.04 version as well.

sudo add-apt-repository ppa:hamishmb/myppa
sudo apt update
sudo apt install ddrescue-gui
Parto
  • 15,027
  • 24
  • 86
  • 114
wst
  • 87
  • 1
  • 1
  • 6
  • 1
    I know the OP has probably already dealt with this problem, but note that if it doesn't install you have to add universe to your source list. This can be done through the "Software & Updates' application on the first tab. – Pixelated Fish Oct 24 '20 at 17:24