Installing packages from terminal

13,592

Solution 1

In the terminal I chose directory and did: "sudo apt-get intall *.deb"

Here there are two problems:

  1. intall is misspelled, it should be install
  2. apt-get do not install local packages. It only installs packages that comes from the repositories.

So, you are using a screwdriver when you need a hammer, and that hammer is called dpkg. With dpkg you can install packages manually only using:

sudo dpkg -i *.deb

Of course, this could leave some dependencies with problems. For that I use GDebi instead:

sudo apt-get install gdebi-core
sudo gdebi *.deb

This will install the packages and any dependency needed.

Solution 2

To install a.deb file you need to do the following commands on terminal,

cd /path/to/the/directory/contains/filename.deb
sudo dpkg -i filename.deb

To install all the .deb files from a directory,you can try

  cd /path/to/the/directory/contains/.deb files
  sudo dpkg -i *.deb
Share:
13,592

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    So, I tried installing a lot of packages that are in one of my folders. In the terminal I chose directory and did: "sudo apt-get install *.deb" I've gotten a lot of errors that say "couldn't find any package by regex" or something like this. I'm doing this on computer with no internet access. What does it mean and what wrong did I did?

  • dhpasta
    dhpasta over 10 years
    Here you have more info about installing everything in Ubuntu - bookmark at .deb packages
  • Admin
    Admin over 10 years
    So it means that I must install all packages one by one? Or I can not add the "filename.deb" and it will install all of them? I read somewhere that I can do something like *.deb to install all packages that are in that directory.
  • Johannes Cramer
    Johannes Cramer over 10 years
    Thank you, really good answer. Only one more question: does gdebi displays all of the dependency's that can't be satisfied or only the first it met?
  • dhpasta
    dhpasta over 10 years
    I have no idea, you must read a little help of this command. I'm installing *.deb by SoftwareCenter, just double click on it