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

2 Answers2

1

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.

mchid
  • 44,904
  • 8
  • 102
  • 162
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.