0

Guys: I'm tearing my hair out on this problem. I have 2 .deb files ready to install, and when I do sudo apt-get install *.deb I get:

E: Unable to locate package discord-0.0.14.deb
E: Couldn't find any package by glob 'discord-0.0.14.deb'
E: Couldn't find any package by regex 'discord-0.0.14.deb'
E: Unable to locate package XnViewMP-linux-x64.deb
E: Couldn't find any package by glob 'XnViewMP-linux-x64.deb'
E: Couldn't find any package by regex 'XnViewMP-linux-x64.deb'

My ls -lah shows:

drwxr-xr-x  2 root    root    4.0K Mar 24 08:56 .
drwxr-xr-x 10 root    root    4.0K Mar  2 20:57 ..
-rwxrwxr-x  1 kcredden kcredden  69M Mar 24 08:54 discord-0.0.14.deb
-rwxrwxr-x  1 kcredden kcredden  52M Mar 24 08:52 XnViewMP-linux-x64.deb

There was one fix that said some app wasn't installed, which I did and it fixed it then. But now I've got the same problem, so any help?

    NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
4
  • Hi and welcome. Why are you doing apt get if you have the file already on your hard drive? The sudo apt-get update command is used to download package information from all configured sources. The sources often defined in /etc/apt/sources. ... So when you run update command, it downloads the package information from the Internet. It is useful to get info on an updated version of packages or their dependencies.
    – David
    Mar 24, 2021 at 13:56
  • To help you with the install read this already answered question. unix.stackexchange.com/questions/159094/…
    – David
    Mar 24, 2021 at 13:58
  • 2
    If you're in the directory that the file is in, you can install it one of two ways: sudo apt install ./discord-0.0.14.deb or sudo dpkg -i discord-0.0.14.deb. Notice when using the apt command you put a ./ in front of the file so that apt knows you are using from the folder you are in.
    – Terrance
    Mar 24, 2021 at 14:06
  • Yes, you need to use ./ when referring to packages in the current directory when using apt.
    – mchid
    Apr 4, 2021 at 23:21

2 Answers 2

0

Terrance and David:

Thanks for the help. I finally managed to get them installed using:

sudo dpkg --force-depends -i /path/to/package.deb

Some of the command structure is somewhat new to me, which is one reason I goofed. But also I tried everything you pointed out in the answered question, David before I got that one that worked.

It seems U-20 still has some bugs needing worked out.

1
  • If a system has bugs, please report them (help.ubuntu.com/community/ReportingBugs) or be specific and provide the bug tracker IDs. Bugs don't exist until they are reported. apt-get provides the clue in it's name, it 'gets' the packages from the internet (and doesn't install local files). Be careful with using --force-depends or you'll find yourself back here with package problems (or crashing programs if ABI/APIs don't match up; what dep-rules help prevent)
    – guiverc
    Mar 24, 2021 at 22:02
0

The problem is the syntax used. When no path is specified, apt assumes you are referring to a package name, not a file. Apt requires the full path to install a package from a deb file, even when the package is in the current directory. The path to the current directory is ./

So, instead of this:

sudo apt install *.deb

you should use the full path:

sudo apt install ./*.deb

However, to avoid conflicting dependencies, you should update your package list before you begin like this:

sudo apt update
sudo apt install ./*.deb

Additionally, if you install using dpkg -i package.deb or dpkg --force-depends -i package.deb, you need to run the following command to install the necessary dependencies after installation.

sudo apt -f install

Just run the command as is and do not specify a file or a package name.

You see, the --force-depends flag simply returns dependency errors as warnings and does not download or install the necessary dependencies. sudo apt -f install uses the "fix" flag to actually fix those dependencies.

Not the answer you're looking for? Browse other questions tagged .