about installing offline packages

Asked by mahesh kolekar

I install packages offline. Using following method

sudo apt-get --download-only install vlc

From /var/cache/apt I install them manually

So when I was trying to install aptoncd package

I found following two packages interdependent

libgnome2-0_2.32.1-4ubuntu1_i386

And

libgnome2-bin_2.32.1-4ubuntu1_i386

When I try to install first package it asks for second one
And while installing second one it asks for first package

What should be done in such case

One more thing

Suppose I want to install vlc

i need to install all related packages manually clicking on each package

Is there any command by using i can genrate a report of all dependacies required for respected package

And

If I can create a batch file for vlc package and required packages

And if i need to intall vlc I just run that batch file.

(I am asking this because all packages lands in the /var/cache/apt folder for every software and it becomes a bit hard to search and install offline)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Don't bother with aptoncd. Just copy the debs from /var/cache/apt/archives on the source system and copy them all to the same folder on the destination. You can now install the application offline.

If it doesn't work then cd to /var/cache/apt/archives and use the dpkg command to install the deb.

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#2

I just tried to copy my old bacup .deb files to /var/cache/apt/archives

But unable to paste

I logged in as admin but unable to change permissions for the archive folder

And

Can you give me an example how to use dpkg command?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What is the output of:

cat /etc/issue

On the destination?

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#4

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh# cat /etc/issue
Ubuntu 14.04 LTS \n \l

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh# cd /var/cache/apt/archives
root@mahesh-300E4Z-300E5Z-300E7Z:/var/cache/apt/archives# cat /etc/issue
Ubuntu 14.04 LTS \n \l

here is the output for your requested command

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Then you can run :

sudo nautilus $HOME

You can then copy the debs. Your user does not have write access to the archives folder

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#6

Can I login as a root?
Is there any method to do that?

As when installing Ubuntu I created only one user

Thanks for the reply

I will check your suggested method

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#7

I just ran the command you provided

And a system program error just generated

I am giving output for your reuested command

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh# sudo nautilus $HOME

(nautilus:24731): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(nautilus:24731): GLib-GObject-WARNING **: invalid cast from 'GtkMessageDialog' to 'NautilusWindow'
**
ERROR:nautilus-window.c:2116:nautilus_window_get_slots: assertion failed: (NAUTILUS_IS_WINDOW (window))

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh#

Is there a bug in my system?

And how can I check my system is working fine?

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#8

I just upgraded nautilus

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh# sudo apt-get --download-only install nautilus
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  gnome-sushi
The following packages will be upgraded:
  nautilus
1 upgraded, 0 newly installed, 0 to remove and 359 not upgraded.
Need to get 485 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main nautilus i386 1:3.10.1-0ubuntu9.3 [485 kB]
Fetched 485 kB in 30s (16.1 kB/s)
Download complete and in download only mode

After running above same command following error is generated

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh# sudo nautilus $HOME

(nautilus:26011): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory

Please ask your system administrator to enable user sharing.

(nautilus:26011): GLib-GIO-WARNING **: Missing callback called fullpath = /root/.config/user-dirs.dirs

(nautilus:26011): GLib-CRITICAL **: Source ID 169 was not found when attempting to remove it

(nautilus:26011): GLib-CRITICAL **: Source ID 170 was not found when attempting to remove it

(nautilus:26011): GLib-CRITICAL **: Source ID 171 was not found when attempting to remove it

root@mahesh-300E4Z-300E5Z-300E7Z:/home/mahesh#

I guess that I dont have admin previleges

So as I asked previously

How to login as root OR the system admin?

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#9

1. You can safely ignore these nautilus-Glib error messages.

2. You can temporarily gain admin privileges with the sudo command
e.g.
sudo cp /whatever/source/directory/*.deb /var/cache/apt/archives/

3. If two deb files depend on each other you can install them with one common command
e.g.
sudo dpkg --install libgnome2-0_2.32.1-4ubuntu1_i386.deb libgnome2-bin_2.32.1-4ubuntu1_i386.deb

Revision history for this message
mahesh kolekar (mailmahesh-kolekar) said :
#10

Thanks Manfred Hampl, that solved my question.