Re: broke package management (warning long)

2011-02-14 Thread Benjamin Scott
On Mon, Feb 14, 2011 at 9:21 PM, Jeffry Smith  wrote:
> Either get the modules installed or remove the
> kernel from /boot ...
> update-initramfs doesn't actually care where or how the kernel/modules
> were installed.  It just iterates over the kernels it finds in /boot
> building initramfs's.  ...

  I was thinking one could prolly just rename the kernel image file so
that it doesn't match whatever pattern update-initramfs is looking
for.  So I went looking at the source.  It appears what
update-initramfs is *actually* doing is iterating over the version
numbers from /var/lib/initramfs-tools/* and looking to build an initrd
image for each one.

  According to dpkg on my Debian 5.0 box, no package owns anything under there:

blackfire$ dpkg -S /var/lib/initramfs-tools/*
dpkg: /var/lib/initramfs-tools/2.6.26-2-686 not found.
blackfire$

  I guess it's another not-quite-managed-package thing.  So... at
least look in /var/lib/initramfs-tools/ and see if there's something
in there that shouldn't be.  If so, move it somewhere else, I guess.

-- Ben

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: broke package management (warning long)

2011-02-14 Thread Jeffry Smith
On Mon, Feb 14, 2011 at 10:52 PM, Joshua Judson Rosen
 wrote:
> Jeffry Smith  writes:
>> dpkg is failing because update-initramfs is trying to build
>> an initramfs for a kernel that doesn't have modules installed.
>>
>> You can also run update-initramfs manually (sudo update-initramfs -k
>> all), and it should update all kernels you have, although will through
>> an error on the 2.6.30.7 one without the modules.  If there are still
>> problems, run "sudo update-initramfs -k " to
>> just update one of the kernels in your boot directory.
>
> She'll still need to actually get the issue resolved in some way
> that allows that stuck postinst script to complete successfully, though.
>
> One way, which has been suggested, is to go find the missing modules
> and install them.
>
> Alternately, she's sure that she's not actually using that kernel,
> maybe she could just *remove it the bad kernel* rather than trying
> to make it good?
>
Yes, that's an option.  Either get the modules installed or remove the
kernel from /boot (assuming it's not needed for boot, which I assume
not, since she's able to get it up to run apt/dpkg).
update-initramfs doesn't actually care where or how the kernel/modules
were installed.  It just iterates over the kernels it finds in /boot
building initramfs's.  The actual dpkg problem is that the postinst
script is not finishing because update-initramfs is failing, not a
problem with dpkg.  It's working exactly as designed.

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: broke package management (warning long)

2011-02-14 Thread Joshua Judson Rosen
Jeffry Smith  writes:
>
> On Mon, Feb 14, 2011 at 8:48 AM, Lori Nagel  wrote:
> >
> >
> > jastiv@localhost:/var/log$ dpkg -S /lib/modules/2.6.30.7-libre-fshoppe1
> > dpkg: /lib/modules/2.6.30.7-libre-fshoppe1 not found.
> >
> > then I tried on a file I know was installed by the package manager.
> >
> > jastiv@localhost:/var/log$ dpkg -S /usr/share/gnome/help/gnect/it/figures
> > gnome-games-data: /usr/share/gnome/help/gnect/it/figures
> > jastiv@localhost:/var/log$
> >
> > basically the command does not work because the folder is no
> > longer there for some reason.
>
> Run "aptitude search linux-image" to see if you have a package with
> linux-image-2.6.30.7-libre-fshoppe1 installed.  If the kernel was
> manually installed and the /lib/modules deleted, you would have this
> problem.

Or if power was cut abruptly in the middle of an installation/upgrade
and the newly-created directory `disappeared' after reboot because
it hadn't actually been flushed to disk, maybe?

Also:

> dpkg is failing because update-initramfs is trying to build
> an initramfs for a kernel that doesn't have modules installed.
>
> You can also run update-initramfs manually (sudo update-initramfs -k
> all), and it should update all kernels you have, although will through
> an error on the 2.6.30.7 one without the modules.  If there are still
> problems, run "sudo update-initramfs -k " to
> just update one of the kernels in your boot directory.

She'll still need to actually get the issue resolved in some way
that allows that stuck postinst script to complete successfully, though.

One way, which has been suggested, is to go find the missing modules
and install them.

Alternately, she's sure that she's not actually using that kernel,
maybe she could just *remove it the bad kernel* rather than trying
to make it good?

> Note that dpkg -S goes against the package cache/library, not the
> directories.  It's most likely failing because this was a manually
> installed kernel, not from a package.

Actually, that brings to mind another interesting possibility--basically
the exact opposite of the scenario I posited above: maybe it *was*
a packaged kernel, and it was in the process of being *removed*
when the system crashed hard--which might have some bits hanging around
because the *unlink* operations didn't get flushed to disk?

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr."

___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Re: broke package management (warning long)

2011-02-14 Thread Jeffry Smith
On Mon, Feb 14, 2011 at 8:48 AM, Lori Nagel  wrote:
>
>
> jastiv@localhost:/var/log$ dpkg -S /lib/modules/2.6.30.7-libre-fshoppe1
> dpkg: /lib/modules/2.6.30.7-libre-fshoppe1 not found.
>
> then I tried on a file I know was installed by the package manager.
>
> jastiv@localhost:/var/log$ dpkg -S /usr/share/gnome/help/gnect/it/figures
> gnome-games-data: /usr/share/gnome/help/gnect/it/figures
> jastiv@localhost:/var/log$
>
> basically the command does not work because the folder is no longer there for
> some reason.
>
>
Run "aptitude search linux-image" to see if you have a package with
linux-image-2.6.30.7-libre-fshoppe1 installed.  If the kernel was
manually installed and the /lib/modules deleted, you would have this
problem.  dpkg is failing because update-initramfs is trying to build
an initramfs for a kernel that doesn't have modules installed.

You can also run update-initramfs manually (sudo update-initramfs -k
all), and it should update all kernels you have, although will through
an error on the 2.6.30.7 one without the modules.  If there are still
problems, run "sudo update-initramfs -k " to
just update one of the kernels in your boot directory.

Note that dpkg -S goes against the package cache/library, not the
directories.  It's most likely failing because this was a manually
installed kernel, not from a package.
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: Re: broke package management (warning long)

2011-02-13 Thread Lori Nagel


jastiv@localhost:/var/log$ dpkg -S /lib/modules/2.6.30.7-libre-fshoppe1
dpkg: /lib/modules/2.6.30.7-libre-fshoppe1 not found.

then I tried on a file I know was installed by the package manager.

jastiv@localhost:/var/log$ dpkg -S /usr/share/gnome/help/gnect/it/figures
gnome-games-data: /usr/share/gnome/help/gnect/it/figures
jastiv@localhost:/var/log$ 

basically the command does not work because the folder is no longer there for 
some reason. 





From: Chris Linstid 
To: Lori Nagel 
Sent: Sun, February 13, 2011 6:28:35 PM
Subject: Re: broke package management (warning long)

I'm pretty sure that this was broken before you issued your first listed 
apt-get 

install command. It looks like you have a kernel package registered as 
installed, but one of the directories it installed, 
/lib/modules/2.6.30.7-libre-fshoppe1, is now gone. You should be able to track 
down the .deb that contained that kernel, reinstall it using "sudo dpkg -i 
package.deb" to get the directory back. Re-run "dpkg --configure -a" to finish 
configuring the outstanding packages and then go back to your original apt-get 
install command.

I'm pretty sure you can figure out which package installed that directory by 
running "dpkg -S /lib/modules/2.6.30.7-libre-fshoppe1".

clinstid@obiwan:~$ dpkg -S /lib/modules/2.6.35-22-generic-pae
linux-image-2.6.35-22-generic-pae, linux-headers-2.6.35-22-generic-pae: 
/lib/modules/2.6.35-22-generic-pae
 - Chris



On Sun, Feb 13, 2011 at 4:05 PM, Lori Nagel  wrote:

For anyone interested in how I broke my package management in gNewSense (a
>ubuntu derivative)
>read on the terminal commands that I have tried.
>I still do not understand what I did that led to it not working anymore.
>
>jastiv@localhost:~/Programs$ sudo apt-get install gtk-devel
>[sudo] password for jastiv:
>E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct
>the problem.
>
>jastiv@localhost:~/Programs$ dpkg --configure
>dpkg: requested operation requires superuser privilege
>jastiv@localhost:~/Programs$ sudo dpkg --configure
>dpkg: --configure needs at least one package name argument
>
>Type dpkg --help for help about installing and deinstalling packages [*];
>Use `dselect' or `aptitude' for user-friendly package management;
>Type dpkg -Dhelp for a list of dpkg debug flag values;
>Type dpkg --force-help for a list of forcing options;
>Type dpkg-deb --help for help about manipulating *.deb files;
>Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].
>

>
>jastiv@localhost:~/Programs$ sudo apt-get install gtk-devel
>[sudo] password for jastiv:
>E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct
>the problem.
>
>jastiv@localhost:~/Programs$ man dh_make
>No manual entry for dh_make
>jastiv@localhost:~/Programs$ man dpkg
>jastiv@localhost:~/Programs$ dpkg --configure -a
>dpkg: requested operation requires superuser privilege
>jastiv@localhost:~/Programs$ sudo dpkg --configure -a
>[sudo] password for jastiv:
>Setting up initramfs-tools (0.85eubuntu36) ...
>update-initramfs: deferring update (trigger activated)
>
>Processing triggers for initramfs-tools ...
>update-initramfs: Generating /boot/initrd.img-2.6.30.7-libre-fshoppe1
>Cannot find /lib/modules/2.6.30.7-libre-fshoppe1
>update-initramfs: failed for /boot/initrd.img-2.6.30.7-libre-fshoppe1
>dpkg: subprocess post-installation script returned error exit status 1
>jastiv@localhost:~/Programs$ lspci | grep -i vga
>01:00.0 VGA compatible controller: nVidia Corporation Unknown device 06e4 (rev
>a1)
>jastiv@localhost:~/Programs$ sudo dpkg --configure -a
>[sudo] password for jastiv:
>Setting up initramfs-tools (0.85eubuntu36) ...
>update-initramfs: deferring update (trigger activated)
>
>Processing triggers for initramfs-tools ...
>update-initramfs: Generating /boot/initrd.img-2.6.30.7-libre-fshoppe1
>Cannot find /lib/modules/2.6.30.7-libre-fshoppe1
>update-initramfs: failed for /boot/initrd.img-2.6.30.7-libre-fshoppe1
>dpkg: subprocess post-installation script returned error exit status 1
>jastiv@localhost:~/Programs$ sudo apt-get -f install
>E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct
>the problem.
>
>jastiv@localhost:~/Programs$ sudo apt-get -f install
>E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct
>the problem.
>
>jastiv@localhost:~/Programs$ tail /var/log/dpkg.log
>2011-01-26 21:39:56 status triggers-pending initramfs-tools 0.85eubuntu36
>2011-01-26 21:39:56 trigproc initramfs-tools 0.85eubuntu36 0.85eubuntu36
>2011-01-26 21:39:56 status half-configured initramfs-tools 0.85eubuntu36
>2011-01-26 21:56:26 star

Re: [gNewSense-users] broke package management (warning long)

2011-02-13 Thread Lori Nagel
> jastiv@localhost:~/Programs$ sudo dpkg --configure -a
> [sudo] password for jastiv: 
> Setting up initramfs-tools (0.85eubuntu36) ...
> update-initramfs: deferring update (trigger activated)
> 
> Processing triggers for initramfs-tools ...
> update-initramfs: Generating /boot/initrd.img-2.6.30.7-libre-fshoppe1
> Cannot find /lib/modules/2.6.30.7-libre-fshoppe1
> update-initramfs: failed for /boot/initrd.img-2.6.30.7-libre-fshoppe1
> dpkg: subprocess post-installation script returned error exit status 1
> jastiv@localhost:~/Programs$ sudo apt-get -f install
> E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to 
> correct 
>
> the problem. 
> 

basically what I did was this:  sudo dpkg --configure -a
(so I was root) then this when I got this message 

update-initramfs: failed for /boot/initrd.img-2.6.30.7-libre-fshoppe1
> dpkg: subprocess post-installation script returned error exit status 1

I did this  sudo apt-get -f install

and went back to this
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct 
> the problem. 



- Original Message 
From: Aurelien Desbrieres 
To: gnewsense-us...@nongnu.org
Sent: Sun, February 13, 2011 4:34:12 PM
Subject: Re: [gNewSense-users] broke package management (warning long)

On Sun, 2011-02-13 at 13:05 -0800, Lori Nagel wrote:
> For anyone interested in how I broke my package management in gNewSense (a 
> ubuntu derivative)
> read on the terminal commands that I have tried. 
> I still do not understand what I did that led to it not working anymore. 
> 
> jastiv@localhost:~/Programs$ sudo apt-get install gtk-devel
> [sudo] password for jastiv: 
> E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to 
> correct 
>
> the problem. 
> 
> jastiv@localhost:~/Programs$ dpkg --configure


You must execute the command in root # dpkg --configure -a

Have fun & Be Free!


  
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: broke package management (warning long)

2011-02-13 Thread Jeffry Smith
On Mon, Feb 14, 2011 at 1:35 AM, Lori Nagel  wrote:
> jastiv@localhost:~/Programs$ sudo dpkg --configure -a
> [sudo] password for jastiv:
> Setting up initramfs-tools (0.85eubuntu36) ...
> update-initramfs: deferring update (trigger activated)
>
> Processing triggers for initramfs-tools ...
> update-initramfs: Generating /boot/initrd.img-2.6.30.7-libre-fshoppe1
> Cannot find /lib/modules/2.6.30.7-libre-fshoppe1
> update-initramfs: failed for /boot/initrd.img-2.6.30.7-libre-fshoppe1
> dpkg: subprocess post-installation script returned error exit status 1

Appears you have a boot image 2.6.30.7-libre-fshoppe1, but no
/lib/modules to match (somehow deleted or never installed).
initramfs-tools is attempting to create the initramfs, but can't find
the requisite modules.  Note that this would affect ANY kernel in boot
- whether installed by dpkg/apt or manually.  As Chris mentioned, you
can use dpkg -S to find out what installed them, if it was from a .deb
package.  After that you can re-install the kernel via dpkg, or delete
the kernel via dpkg (I assume you have another working kernel, since
you can boot the system - 2.6.30.7 is an old kernel, so you might want
to have a more recent one).  Once you have a /lib/modules for all your
kernels in /boot, rerun "sudo dpkg --configure -a" and you should have
a working system.


jeff
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/


Re: broke package management (warning long)

2011-02-13 Thread Chris Linstid
I'm pretty sure that this was broken before you issued your first listed
apt-get install command. It looks like you have a kernel package registered
as installed, but one of the directories it installed,
/lib/modules/2.6.30.7-libre-fshoppe1, is now gone. You should be able to
track down the package that contained that kernel, reinstall it using "sudo
dpkg -i package.deb" to get the directory back. Re-run "dpkg --configure -a"
to finish configuring the outstanding packages (you might not need to do
that because it may be triggered by the installation of the kernel package)
and then go back to your original apt-get install command.

I'm pretty sure you can figure out which package installed that directory by
running "dpkg -S /lib/modules/2.6.30.7-libre-fshoppe1".

clinstid@obiwan:~$ dpkg -S /lib/modules/2.6.35-22-generic-pae
linux-image-2.6.35-22-generic-pae, linux-headers-2.6.35-22-generic-pae:
/lib/modules/2.6.35-22-generic-pae

 - Chris


On Sun, Feb 13, 2011 at 4:05 PM, Lori Nagel  wrote:

> For anyone interested in how I broke my package management in gNewSense (a
> ubuntu derivative)
> read on the terminal commands that I have tried.
> I still do not understand what I did that led to it not working anymore.
>
> jastiv@localhost:~/Programs$ sudo apt-get install gtk-devel
> [sudo] password for jastiv:
> E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to
> correct
> the problem.
>
> jastiv@localhost:~/Programs$ dpkg --configure
> dpkg: requested operation requires superuser privilege
> jastiv@localhost:~/Programs$ sudo dpkg --configure
> dpkg: --configure needs at least one package name argument
>
> Type dpkg --help for help about installing and deinstalling packages [*];
> Use `dselect' or `aptitude' for user-friendly package management;
> Type dpkg -Dhelp for a list of dpkg debug flag values;
> Type dpkg --force-help for a list of forcing options;
> Type dpkg-deb --help for help about manipulating *.deb files;
> Type dpkg --license for copyright license and lack of warranty (GNU GPL)
> [*].
>
> Options marked [*] produce a lot of output - pipe it through `less' or
> `more' !
> jastiv@localhost:~/Programs$ dpkg --help
> Usage: dpkg [ ...] 
>
> Commands:
>  -i|--install   <.deb file name> ... | -R|--recursive  ...
>  --unpack   <.deb file name> ... | -R|--recursive  ...
>  -A|--record-avail  <.deb file name> ... | -R|--recursive  ...
>  --configure|--triggers-only  ... | -a|--pending
>  -r|--remove ... | -a|--pending
>  -P|--purge  ... | -a|--pending
>  --get-selections [ ...] Get list of selections to stdout.
>  --set-selections Set package selections from stdin.
>  --clear-selections   Deselect every non-essential package.
>  --update-availReplace available packages info.
>  --merge-avail Merge with info from file.
>  --clear-availErase existing available info.
>  --forget-old-unavail Forget uninstalled unavailable pkgs.
>  -s|--status  ...Display package status details.
>  -p|--print-avail  ...   Display available version details.
>  -L|--listfiles  ... List files `owned' by package(s).
>  -l|--list [ ...]List packages concisely.
>  -S|--search  ...Find package(s) owning file(s).
>  -C|--audit   Check for broken package(s).
>  --print-architecture Print dpkg architecture.
>  --compare-versions Compare version numbers - see below.
>  --force-help Show help on forcing.
>  -Dh|--debug=help Show help on debugging.
>
>  -h|--helpShow this help message.
>  --versionShow the version.
>  --license|--licence  Show the copyright licensing terms.
>
> Use dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field|
>  -x|--extract|-X|--vextract|--fsys-tarfile  on archives (type dpkg-deb
> --help).
>
> For internal use: dpkg --assert-support-predepends | --predep-package |
>  --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep.
>
> Options:
>  --admindir= Use  instead of /var/lib/dpkg.
>  --root= Install on a different root directory.
>  --instdir=  Change installation dir without changing admin
> dir.
>  -O|--selected-only Skip packages not selected for install/upgrade.
>  -E|--skip-same-version Skip packages whose same version is installed.
>  -G|--refuse-downgrade  Skip packages with earlier version than
> installed.
>  -B|--auto-deconfigure  Install even if it would break some other
> package.
>  [--no-]triggersSkip or force consequential trigger processing.
>  --no-debsigDo not try to verify package signatures.
>  --no-act|--dry-run|--simulate
> Just say what we would do - don't do it.
>  -D|--debug= Enable debugging (see -Dhelp or --debug=help).
>  --status-fd Send status change updates to file desc

broke package management (warning long)

2011-02-13 Thread Lori Nagel
For anyone interested in how I broke my package management in gNewSense (a 
ubuntu derivative)
read on the terminal commands that I have tried. 
I still do not understand what I did that led to it not working anymore. 

jastiv@localhost:~/Programs$ sudo apt-get install gtk-devel
[sudo] password for jastiv: 
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct 
the problem. 

jastiv@localhost:~/Programs$ dpkg --configure
dpkg: requested operation requires superuser privilege
jastiv@localhost:~/Programs$ sudo dpkg --configure
dpkg: --configure needs at least one package name argument

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

Options marked [*] produce a lot of output - pipe it through `less' or `more' !
jastiv@localhost:~/Programs$ dpkg --help
Usage: dpkg [ ...] 

Commands:
  -i|--install   <.deb file name> ... | -R|--recursive  ...
  --unpack   <.deb file name> ... | -R|--recursive  ...
  -A|--record-avail  <.deb file name> ... | -R|--recursive  ...
  --configure|--triggers-only  ... | -a|--pending
  -r|--remove ... | -a|--pending
  -P|--purge  ... | -a|--pending
  --get-selections [ ...] Get list of selections to stdout.
  --set-selections Set package selections from stdin.
  --clear-selections   Deselect every non-essential package.
  --update-availReplace available packages info.
  --merge-avail Merge with info from file.
  --clear-availErase existing available info.
  --forget-old-unavail Forget uninstalled unavailable pkgs.
  -s|--status  ...Display package status details.
  -p|--print-avail  ...   Display available version details.
  -L|--listfiles  ... List files `owned' by package(s).
  -l|--list [ ...]List packages concisely.
  -S|--search  ...Find package(s) owning file(s).
  -C|--audit   Check for broken package(s).
  --print-architecture Print dpkg architecture.
  --compare-versions Compare version numbers - see below.
  --force-help Show help on forcing.
  -Dh|--debug=help Show help on debugging.

  -h|--helpShow this help message.
  --versionShow the version.
  --license|--licence  Show the copyright licensing terms.

Use dpkg -b|--build|-c|--contents|-e|--control|-I|--info|-f|--field|
 -x|--extract|-X|--vextract|--fsys-tarfile  on archives (type dpkg-deb --help).

For internal use: dpkg --assert-support-predepends | --predep-package |
  --assert-working-epoch | --assert-long-filenames | --assert-multi-conrep.

Options:
  --admindir= Use  instead of /var/lib/dpkg.
  --root= Install on a different root directory.
  --instdir=  Change installation dir without changing admin dir.
  -O|--selected-only Skip packages not selected for install/upgrade.
  -E|--skip-same-version Skip packages whose same version is installed.
  -G|--refuse-downgrade  Skip packages with earlier version than installed.
  -B|--auto-deconfigure  Install even if it would break some other package.
  [--no-]triggersSkip or force consequential trigger processing.
  --no-debsigDo not try to verify package signatures.
  --no-act|--dry-run|--simulate
 Just say what we would do - don't do it.
  -D|--debug= Enable debugging (see -Dhelp or --debug=help).
  --status-fd Send status change updates to file descriptor .
  --log=   Log status changes and actions to .
  --ignore-depends=,...
 Ignore dependencies involving .
  --force-...Override problems (see --force-help).
  --no-force-...|--refuse-...
 Stop when problems encountered.
  --abort-after   Abort after encountering  errors.

Comparison operators for --compare-versions are:
  lt le eq ne ge gt   (treat empty version as earlier than any version);
  lt-nl le-nl ge-nl gt-nl (treat empty version as later than any version);
  < << <= = >= >> >   (only for compatibility with control file syntax).

Use `dselect' or `aptitude' for user-friendly package management.
jastiv@localhost:~/Programs$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
jastiv@localhost:~/Programs$ sudo apt-get -f install
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct 
the problem. 

jastiv@localhost:~/Programs$ sudo apt-get install gtk-