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.

273 12-02-2016 01:10 PM

Quote:

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

when the Chrome .deb is installed one of the things it does is add a repository to your system -- remove that repository and it will not longer update.
A few package do that but, to my mind, it's almost worse that they do because they're altering a system file when all you want is a browser. Yes it's convenient but, to me at least, it almost seems sneaky -- I'd rather Google publish repositories as Oracle do for VirtualBox, for example. But that's just my opinion.

replica9000 12-02-2016 04:05 PM

Quote:

Originally Posted by 273 (Post 5637164)
when the Chrome .deb is installed one of the things it does is add a repository to your system -- remove that repository and it will not longer update.
A few package do that but, to my mind, it's almost worse that they do because they're altering a system file when all you want is a browser. Yes it's convenient but, to me at least, it almost seems sneaky -- I'd rather Google publish repositories as Oracle do for VirtualBox, for example. But that's just my opinion.

They used to publish the repo on their website some time ago, which is where I originally got Chrome from. I also agree that the package shouldn't add it's own source entry either. Seems like M$ behavior to me.

rokytnji 12-03-2016 12:03 PM

Opera also asks if you want to add their repository to your sources list when you download and install their .deb file.

At least that was so last time I tried Opera.

Code:

deb http://deb.opera.com/opera/ stable non-free

273 12-03-2016 01:08 PM

Quote:

Originally Posted by rokytnji (Post 5637471)
Opera also asks if you want to add their repository to your sources list when you download and install their .deb file.

At least that was so last time I tried Opera.

Code:

deb http://deb.opera.com/opera/ stable non-free

Ah, I thought Opera was different but forgot how. It asks, which is a good middle-ground if you ask me.


All times are GMT -5. The time now is 06:07 PM.