LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with Synaptic Package Manager... sometimes! (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-synaptic-package-manager-sometimes-607115/)

rsf21 12-16-2007 09:20 AM

Problem with Synaptic Package Manager... sometimes!
 
New to the Linux environment, but enjoying my first introductions to it via my brand new Asus eee pc.

Have activated the KDE 'advanced desktop' and have been learning my first few commands ('sudo bash' etc) and have had some success installing some software (eg Bluefish editor; Audacity etc) having pointed Synaptic at some repositories as recommended by the Wiki over at eeeuser.com

Problem is that occasionally Synaptic (which I'm running from Launcher-->Applications rather than the console) throws up its hands in horror when I want to install or update something.

For example, selecting GIMP, I get the following:

Code:

E:unable to parse package file /var/lib/dpkg/status (2)
E:unable to lock the download directory

I have zero idea what to do next.......

Any help for this genuine noob to Linux gratefully received!

pixellany 12-16-2007 09:30 AM

Where exactly are these errors occurring? e.g. are you selecting "mark for download" and then "apply"?

The second error sounds like Synaptic thinks that some other application is trying to use the files. Try "ps -e" to see if you can see any clues. If all else fails, just re-boot and see if that fixes it.

Also, try "reload" to make sure the local database is up to date.

matthewg42 12-16-2007 09:36 AM

How do you launch synaptic when you get this command?

rsf21 12-16-2007 05:33 PM

Quote:

Where exactly are these errors occurring? e.g. are you selecting "mark for download" and then "apply"?
Yes, basically. I clicked on Gimp, selected "Mark for installation" and then on "Apply".

I'm then told that "5 new packages will be intalled... 0 B have to be downloaded".

Tried reload (and have tried this before and after a reboot), but no success - same error messages.

Quote:

How do you launch synaptic when you get this command?
I'm running from Launcher-->Applications rather than the console. Presumably, it would be from a console I would use the ps -e command? What does that do?

Thanks for noticing my question - hope my answers throw some light (though I suspect not!).

...UPDATE:

I've just done the following from the console:
sudo bash
synaptic
...but not better.

...UPDATE 2:

I've run ps -e - [I've discovered the man which is rather useful, so I now know what ps does!] - is there a process I should be looking for, or do I simply copy and paste here?

rsf21 12-18-2007 10:47 AM

I'm still completely stuck and can't add any new software to the machine now...

Anyone out there able to help? - Please?

matthewg42 12-18-2007 12:42 PM

The reason I asked to see how you were running synaptic was because if you run without root privileges you tend to get some message about a lock file, but from your response it doesn't look like this.

I can think of a few other possibilities:
  1. There is another process running which has some resource locked. There are many possible programs which can do this. The best way to identify if there is one is to use lsof (list open files).
    Code:

    sudo lsof |grep /var/lib/dpkg/lock
    If you see any lines which come back, you need to quit ot otherwise close down the program which has this file open. For example, when I am running synaptic, I see something like this:
    Code:

    synaptic 6931 root 7uW REG 8,4 0 1683217 /var/lib/dpkg/lock
    The two important fields here are the name (first column) and PID (second column). In the case of synaptic it is obvious if I am running it because of the GUI window, so I can close it. If you see a process for dselect, apt-get, aptitude, dpkg and possibly some others, you should try to find the terminal in which that process is running and end it (probably it will be waiting for some unput like "do you really want to install these packages Y/n").

    If you really can't locate the process, you can kill it. Start nicely with this command in a terminal
    Code:

    kill [PID]
    Where [PID] is from the second column of the lsof output. If after 10 seconds or so the process has not died, you can try this:
    Code:

    kill -KILL [PID]
    ...although this should probably be avoided because it's exactly how to get into the sort of problems I describe in item 2.

    One sure-fire way to kill that process if you cannot find it is to reboot the machine. It shouldn't be necessary as you should be able to kill the process, but it might be easier than trying to identify the process which has the resource locked.
  2. If a process which had locked the resource crashed or was otherwise killed in a way which meant it did not unlock the resource properly, then the lock file might persist despite the absense of the process. In this case you need to clear the lock. If you have run the lsof command from part 1 and got no lines of output, you can zap the lock file like this:
    Code:

    sudo rm -f /var/lib/dpkg/lock
    However, this should be a last resort. Deleting lock files manually is rarely a good thing to do.
  3. Perhaps there is some wider problem with your system. For example the filesystem might be corrupt and cause this and other weird behaviour. Run dmesg and look at the last dozen lines or so and check there aren't any scary looking error messages.

Apart from that, I'm out of ideas for now. Tell me how you get on.

farslayer 12-18-2007 01:24 PM

if you have synaptic open more than once.. or are running any other package manager at the same time you will run into this type of issue..

For instance if you have Synaptic open then try to update from the command line using aptitude..


personally I find the command line easier to use for installing and updating.

sudo aptitude update
sudo aptitude install gimp

digital8doug 12-20-2007 01:30 PM

Which Eee PC? Amount of disk space left?
 
RF#, I have 8G w/ 1GB RAM & a 4gs w/ 512 MB. Had Synaptic errors, touch pad was not even working on the SURF. Many reboots finally fixed it, as doubt my changing settings seemed significant!!
but NO touchpad problems w/ 8G!
You have done much more in Linux already than I am familiar with. Have only updated A-V & scanned daily (=3x), then installed latest Ff 2.0 browser, am considering Ff 3 beta 2 after the instl & kick off of Thunderbird. I also DLd safari304b just to see what would happen trying to use a MAC only browser on these machines!
Quote:

Originally Posted by rsf21 (Post 2994807)
I'm still completely stuck and can't add any new software to the machine now... Anyone out there able to help? - Please?

Which Model of Asus do YOU have? Have you tried Eee forum, or called Asus?
My SURF is EEEPC4GS-BK010
SN: 7BOAAQ0320... VN: 1602 MB 701 REV 12
This is probably the most important data {from little sticker on right side when bottom tipped up & turned)

This may be excessive hardware info, but is provided so you understand it MIGHT help some of the others, HW techs here, guess if it is a HW or SW problem on your model. [NOTE: Not sure if this module is on Asus approved list !]
while the 512 =Sis module DDR II 512MB-667 SSX264MB-J6E {then under bar-code in much smaller print SS96-09258462}.
On separate sticker AS 0F107B0009026,
on the concealed side of module 04G001616J174207708.
Under the module on Main board 686 AMIBIOS NB @1999 BN07 3 4 7 2
- - - -
In the BIOS (F2 option when starting) Core version 0401 EC Firmware 701_065

My SURF only boots if Boot Device Priority is 1st=Removable, 2nd=HDD:SM, 3rd ATAPI CD-ROM. I had changed them to HDD Disabled x2 since I had no Rem Dev or CD, but NADA on start!

[I just swapped in a GeIL 2GB 667 Dimm Module ($42 US) module while typing this & just rebooted the surf. Yeah it works nice, 2 GB RAM is read in BIOS!]

Motherboard serial number can be obtained in Diagnostic Tool `DETAILS'
As U can see, i try to document each & every change as I make them, so it is easier to figure out what may have caused a problem.

*** Under SETTINGS: What does `Disk Utility' show as available space ?*?*?

farslayer 12-20-2007 01:50 PM

Quote:

Originally Posted by digital8doug (Post 2997282)
RF#, I have 8G w/ 1GB RAM & a 4gs w/ 512 MB. Had Synaptic errors, touch pad was not even working on the SURF. Many reboots finally fixed it, as doubt my changing settings seemed significant!!
but NO touchpad problems w/ 8G!

I think you are confusing the Hardware Synaptic touch pad found on most laptops with the Software Application "Synaptic package manager" found in Debian based Linux Distros.

digital8doug 12-20-2007 03:32 PM

If hardware not working correct, then is is difficult for software to operate proper!
 
Thank you for clearly spelling out the difference, I did not see any Debian or other tags. I had encountered what I thought was a SW problem, or my not understanding Linux as a noob. Only to find out it ALL went away AFTER I had run complete hardware diagnostics and corrected those errors. As you can see from my threads last year irt Dual Booting. ALL were caused by defects on the Hard Drive that I was initially unaware of!
Quote:

Originally Posted by farslayer (Post 2997302)
I think you are confusing the Hardware Synaptic touch pad found on most laptops with the Software Application "Synaptic package manager" found in Debian based Linux Distros.

Point I tried to make is; Make sure you have room on SSD & all is working correctly. Take your time, make notes as you go so you know what the last change was and the effect, ESPECIALLY as newbie.
Did you overlook little glitches/hick-ups as SW, but were really intermittently caused by HW? Especially on new production models, even though Asus may have best QA globally.
This 8G machine & load is great w/ the Diagnostics under SETTINGS.
My 8G works fine, much better than the SURF which appears crappy to me from a HW operation point. I anticipate calling Asus for RMA in the near future.

rsf21 12-20-2007 04:00 PM

I'm slightly lost by the previous few entries here, but the bottom line is that it turns out this is a known problem on the advanced destop...

See this thread in the eeeuser.com forunms:

http://forum.eeeuser.com/viewtopic.php?id=1598

I'm now using synaptic to find the software and the command line to install it.

SwabBoy 01-09-2008 11:38 PM

Parse error work around, sort of
 
I have the same error with the parse message when trying to install programs on my Asus machine and thought I could no longer use Synaptic. I found a way to use the package manger, however it might be inconvenient and annoying for some. If you receive the parse error when trying to install a package, goto "Settings" and then click on "Repositories". You should get the same error message that you did when trying to install. Just go to the repository menu again and it will let you in without the error message. Then hit cancel or okay and then hit "Apply" to install your marked packages. This method works every time I use it and still allows me to install programs using Synaptic. I hope this helps those of you who don't want to use the command line all the time.


All times are GMT -5. The time now is 02:48 AM.