LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   dpkg vs apt (https://www.linuxquestions.org/questions/linux-software-2/dpkg-vs-apt-4175594504/)

doni 11-30-2016 08:59 AM

dpkg vs apt
 
Hello Guys
Does anyone knows how to install deb package in Ubuntu so that apt will know that package is installed (and the version) and will report it in apt --installed list ?

Regards

sschirrxq 11-30-2016 10:07 AM

Hi,

have you tried to install the package via dpkg?
Just run "dpkg -i /path/to/package.deb".

After that run "apt-get install -f" to resolve the dependencies.

Regards,
Simon

erik2282 11-30-2016 10:51 AM

http://askubuntu.com/questions/43190...-from-deb-file

c0wb0y 11-30-2016 02:15 PM

If apt know it, dpkg know it and vice versa.

Habitual 11-30-2016 02:18 PM

Quote:

Originally Posted by c0wb0y (Post 5636385)
If apt know it, dpkg know it and vice versa.

Yes.

doni 12-01-2016 03:34 AM

Quote:

Originally Posted by Habitual (Post 5636386)
Yes.

Are you Guys sure about this.
From the link (erik2282) above I see:

Now, when you download a .deb file manually, you are bypassing apt and will use dpkg -i packagename.deb to install it instead. This means that apt's database will not be updated and that the apt system will have no knowledge of the package you installed. In other words, apt-get upgrade will never update any manually installed packages.

descendant_command 12-01-2016 04:05 AM

Yes, because the poster in the link is talking bollocks.

Jjanel 12-01-2016 05:07 AM

Oh!: alias bollocks=garbage ;) Try this web-search instead [of that link]: install deb package

replica9000 12-01-2016 03:22 PM

Quote:

Originally Posted by doni (Post 5636587)
Are you Guys sure about this.
From the link (erik2282) above I see:

Now, when you download a .deb file manually, you are bypassing apt and will use dpkg -i packagename.deb to install it instead. This means that apt's database will not be updated and that the apt system will have no knowledge of the package you installed. In other words, apt-get upgrade will never update any manually installed packages.

APT is a frontend for DPKG. APT manages repositories and resolves dependencies for you, while using DPKG to actually make the changes of installing/removing packages. Even when you manually use DPKG to install a package, APT will be aware of it.

You can verify this with "apt list --installed" or "apt-cache show <package> | grep Status"

273 12-01-2016 03:40 PM

What are you trying to do here?
It is correct that if a .deb is installed without any repository it will not be upgraded by apt because apt works on repositories and not files (I simplify but in this situation I feel that's what it amounts to).
So, which package which is not in the Ubuntu repositories do you wish to install and what are your worries about updates?

rokytnji 12-01-2016 05:01 PM

Quote:

Originally Posted by doni (Post 5636242)
Hello Guys
Does anyone knows how to install deb package in Ubuntu so that apt will know that package is installed (and the version) and will report it in apt --installed list ?

Regards

installed with dpkg -i

Code:

$ apt-cache policy clicompanion
clicompanion:
  Installed: 1.3-1
  Candidate: 1.3-1
  Version table:
 *** 1.3-1 0
        100 /var/lib/dpkg/status

If I want a gui look see. I look in synaptic. If I wanna know what dependencies it used to install

Code:

$ apt-rdepends clicompanion
Reading package lists... Done
Building dependency tree     
Reading state information... Done
clicompanion
  Depends: gtk2-engines-pixbuf
  Depends: python (<< 2.8)
  Depends: python-gtk2
  Depends: python-vte
  Depends: sudo
<snip>

If I want to update it. I need to download the newer version and uninstall old version <just my way of doing it> and install newer version with dpkg -i command. If wanting a gui version of dpkg.

Use gdebi

Code:

apt search gdebi
Sorting... Done
Full Text Search... Done
gdebi/stable,now 0.9.5.5+nmu1 all [installed]
  simple tool to view and install deb files - GNOME GUI

gdebi-core/stable,now 0.9.5.5+nmu1 all [installed]
  simple tool to install deb files

gdebi-kde/stable 0.9.5.5+nmu1 all
  simple tool to install deb files - KDE GUI

I am not using Ubuntu. But

Code:

$ inxi -S
System:    Host: biker Kernel: 4.8.10-antix.1-686-smp-pae i686 (32 bit) Desktop: IceWM 1.3.8
          Distro: antiX-15-V_386-full Killah P 30 June 2015

Instead. I also could have used synaptic to install any downloaded .deb package. http://askubuntu.com/questions/17987...rough-synaptic

As far as upgrades go automagically. One needs a repository entry in /etc/apt/sources.list for that.

Habitual 12-01-2016 05:11 PM

We get google chrome from .deb and it updates itself most regularly.....

Habitual 12-01-2016 05:15 PM

Quote:

Originally Posted by doni (Post 5636587)
Now, when you download a .deb file manually, you are bypassing apt and will use dpkg -i packagename.deb to install it instead. This means that apt's database will not be updated and that the apt system will have no knowledge of the package you installed. In other words, apt-get upgrade will never update any manually installed packages.

Your understanding is not factual.
Take this real life example:
We "typically" get google chrome from .deb and it updates itself most regularly.
It has a sources entry and apt/dpkg knows all about it.

https://help.ubuntu.com/community/AptGet/Howto
https://help.ubuntu.com/lts/serverguide/dpkg.html

replica9000 12-01-2016 05:23 PM

Quote:

Originally Posted by Habitual (Post 5636836)
We get google chrome from .deb and it updates itself most regularly.....

I get Chrome from:
Code:

deb http://dl.google.com/linux/chrome/deb/ stable main

Habitual 12-01-2016 05:28 PM

Quote:

Originally Posted by replica9000 (Post 5636843)
I get Chrome from:
Code:

deb http://dl.google.com/linux/chrome/deb/ stable main

Edited for non-advanced Original user.


All times are GMT -5. The time now is 01:42 AM.