LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Synaptic Package Manager (https://www.linuxquestions.org/questions/linux-software-2/synaptic-package-manager-4175594226/)

crabbyfogey 11-25-2016 11:20 AM

Synaptic Package Manager
 
Did an update and got the message "broken dependency". Browsed the SPM to find it, but the items I found had a exclamation point in the selection box and was ghosted. Is that what I'm looking to remove?

and:

There's an orange dot next to some selection boxes, what does that mean?

crazy-yiuf 11-25-2016 11:37 AM

If I remember correctly, broken packages have red selection boxes. In the lower left portion of the screen, there is a "status" button. If you click that and have any broken packages there should be a "broken" option on the left.

Sometimes running "sudo apt-get --fix-broken" will give you useful hints about what needs to be done as well.

ondoho 11-26-2016 03:41 AM

for the sake of discussing this in a sane manner, i suggest you execute the command (probably "sudo apt-get update") in a terminal and post the output here.

crabbyfogey 11-26-2016 01:15 PM

Pun intended?

Initially I didn't get any error info, didn't know what I should look for. I have since managed to chase it down, so here goes. When the SPM tries to install sane-util, it also wants to also install libsane, can't do that because:

E: /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb: trying to overwrite shared '/etc/sane.d/v4l.conf', which is different from other instances of package libsane:amd64

All Greek to me.

ardvark71 11-26-2016 05:13 PM

Hi...

Please run the following command and see if that helps...

Code:

sudo apt-get install -f
Disclaimer: Be careful with commands that are prefaced with "su" or "sudo." They will essentially allow root access to your system. Mistakes could possibly damage or even destroy your OS.

Regards...

frankbell 11-26-2016 07:23 PM

In Synaptic, under the "Edit" menu item, there is a choice to "Fix Broken Packages." I'd try that.

It does the same thing as apt-get -f.

crabbyfogey 11-26-2016 10:50 PM

Tried the fix broken packages, needs to install libsane to fix, that's where I get the error. Used Software Manager to try to install libsane, but it won't install. Says to check my internet connection. ????

Result of sudo apt-get install -f:

Preparing to unpack .../libsane_1.0.23-3ubuntu3.1_amd64.deb ...
Unpacking libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb (--unpack):
trying to overwrite shared '/etc/sane.d/v4l.conf', which is different from other instances of package libsane:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

ardvark71 11-26-2016 11:30 PM

Quote:

Originally Posted by crabbyfogey (Post 5634938)
Tried the fix broken packages, needs to install libsane to fix, that's where I get the error. Used Software Manager to try to install libsane, but it won't install. Says to check my internet connection. ????

Result of sudo apt-get install -f:

Preparing to unpack .../libsane_1.0.23-3ubuntu3.1_amd64.deb ...
Unpacking libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb (--unpack):
trying to overwrite shared '/etc/sane.d/v4l.conf', which is different from other instances of package libsane:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi...

Thank you for posting the results. Do any of the suggestions here or here help? :)

Regards...

crabbyfogey 11-28-2016 10:09 AM

None of those did anything that I can see. I keep getting this same error over and over:

Preparing to unpack .../libsane_1.0.23-3ubuntu3.1_amd64.deb ...
Unpacking libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb (--unpack):
trying to overwrite shared '/etc/sane.d/v4l.conf', which is different from other instances of package libsane:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Should I remove /etc/sane.d/v4l.conf and try to re-install libsane? If so, how?

crazy-yiuf 11-28-2016 11:09 AM

For all of these steps, be careful to read the output and make sure apt-get commands aren't going to try removing too many packages which you need.

I'd start with trying to autoremove, if you haven't, and if it will let you.
Code:

sudo apt-get autoremove
Fewer packages means fewer possible contradictions.

My next step would be to see if sane (which is a process which looks for scanners, I think) is running:
Code:

sudo systemctl | grep sane
If it is, I'd try stopping it, then upgrading:
Code:

sudo systemctl disable <name from last step>
sudo apt-get dist-upgrade

This is a shot in the dark, you can skip this step if it's too much.

Note at this point that you can check what you risk breaking by messing with libsane by running this:
Code:

apt-cache rdepends libsane
Or, in synaptic, right click on libsane, go to properties, and rdepends.

Next I'd try moving the file it doesn't like, like so:
Code:

sudo mv /etc/sane.d/v4l.conf ~
This will move the file to your home folder. Note that it is unlikely to contain anything important unless you set your scanner up manually.

Try upgrading again. If it doesn't work, try reinstalling libsane with
Code:

apt-get install libsane
Here's another more general post I wrote which explains some of this a bit more:
https://www.linuxquestions.org/quest...5/#post5569480

crabbyfogey 11-29-2016 12:42 PM

Here's what I did this morning:

Tried moving the libsane, but still left a copy in /var/cache/apt/archives/. At that point I removed it instead, so it was gone. Couldn't do a reinstall because same error. error processing archive /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb (--unpack)

So tried to remove the sane-utils and just start all over. Wouldn't let me, the command I used: sudo rm /var/cache/apt/archives/sane-util_1.0.23-3ubuntu3.1_amd64.deb. No such file. I can see it in the file system list.

Used Software Manager to uninstall sane-utils so I could reinstall. Couldn't reinstall because 'check your internet connection'. Any ideas what that means?

Habitual 11-29-2016 01:52 PM

Stop deleting stuff.

crazy-yiuf 11-29-2016 02:40 PM

The proper way to get rid of stuff in the cache is with sudo apt-get clean. However, all this does is free up some disk space. The debs sit there so things don't have to be re-downloaded if you interrupt installation. If there's a newer version, apt-get upgrade will pull it in, but only if it is a selected package. You can see your selections with dpkg --get-selections, however, this is exactly what you see in Synaptic as well. The presence of a .deb in the cache will not influence whether it gets installed.

The actual directory where the debs are installed is usually /usr/ - "Unix System Resources". You should not touch this directory. I've been fiddling with Linux for years and never had a reason to, that I can remember. It's just begging for trouble. Debs will also deposit files across /lib/ and elsewhere, the purpose of the package manager is to keep track of all the files for installing and uninstalling. The only directory where you should manually manage installations is /opt, and that's only when you are using proprietary software.

What is the exact output of sudo apt-get remove libsane?

crazy-yiuf 11-29-2016 03:11 PM

Also, have you tried the suggestions google has for your error?
https://askubuntu.com/questions/521252/error-with-dpkg
https://bugs.launchpad.net/ubuntu/+s...s/+bug/1041636

Note that the person in the latter link reports the method from post #10 in this thread working for them.

crabbyfogey 11-29-2016 04:30 PM

No output from rm libsane-checked file system, it was gone. Then tried to reinstall libsane, exact same error:
Preparing to unpack .../libsane_1.0.23-3ubuntu3.1_amd64.deb ...
Unpacking libsane:amd64 (1.0.23-3ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb (--unpack):
trying to overwrite shared '/etc/sane.d/v4l.conf', which is different from other instances of package libsane:amd64
Errors were encountered while processing:
/var/cache/apt/archives/libsane_1.0.23-3ubuntu3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Uninstalled sane-util, did a restart and tried to reinstall--couldn't, internet connection. It seems no matter what approach I take, the same 2 errors, not much to go on.

Last entry for Bug 1041636:
"I solved the problem by removing the mentioned files (fujitsu.conf, genesys.conf, etc...), and letting the install process install them again." I was very careful to only rm the specified libsane in the error message.

I'll try the post #10 sequence again tonight, see what happens.


All times are GMT -5. The time now is 01:28 PM.