0

I'm trying to use an Ubuntu 18.04 LiveUSB to recover a lost file. I've booted into the LiveUSB. Now, I need to install the 'testdisk' package.

I can run $ sudo apt update and $ sudo apt upgrade with normal output and no errors. However, I can't install packages. If I use apt-cache show to find a package, I always get a "No packages found" error. For instance:

$ apt-cache show testdisk
N: Unable to locate package testdisk
E: No packages found
$ apt-cache show cowsay
N: Unable to locate package cowsay
E: No packages found

If I try to install, I always get results like

$ sudo apt install testdisk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package testdisk.

I am connected to the network and can browse the Internet normally from the LiveUSB.

This AskUbuntu answer says that I ought to be able to install packages to the LiveUSB. I don't need it to be persistent, I just need testdisk long enough to recover a file.

How can I install packages in an Ubuntu 18.04 LiveUSB?

2 Answers2

2

Adding testdisk to a Live USB

Testdisk is located in the Universe Repository.

To enable, in terminal run: sudo add-apt-repository universe

Then run: sudo apt update and then sudo apt install testdisk

That should do it.

Bruni
  • 11,099
C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
0

as you can use browser - you can download this as apt/deb from unofficial source and install from filemanager/terminal, you don't even have to use network because file installations are offline and as you downloaded it - save to another pendrive cause it can help you in future ;)