LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-05-2009, 09:55 AM   #1
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Rep: Reputation: 25
apt-get and aptitude


Hi Guys,

I have noticed a strange behavior of my Debian Lenny 5 box.
When I install softwares with either "apt-get install" or "aptitude install" it always ask me to remove some components of my system that I am using or are very important for the system.

This is an example

I tried to install sshfs with "apt-get install sshfs"
Why is it asking to remove all those packages ? I know I have not been using Debian for a long time but it wasn't doing that before

caiman:/etc/apt# apt-get -t lenny-backports install sshfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
bluez-gnome libmtp7 libgksu1.2-0 python-notify aspell libgda3-common
python-gnome2-extras libgksuui1.0-1 evolution-exchange rhythmbox
system-config-printer libgpod3 gnome-themes-extras python-eggtrayicon
gnome-spell python-4suite-xml libgda3-3 transmission-common libgdl-1-0
serpentine libopenobex1 transmission-gtk libgdl-1-common gnome-vfs-obexftp
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
fuse-utils libfuse2
The following NEW packages will be installed
fuse-utils libfuse2 sshfs
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 181kB of archives.
After this operation, 455kB of additional disk space will be used.
Do you want to continue [Y/n]? n
Abort.

Now this is what I get when using "aptitude install sshfs". One should notice that with aptitude, I seem not to have a choice at all about removing thoses packages !!

Could anyone tell me what is happening and most of all, what can I do to not have this anymore? if there is anything to be done of course!! May I say that when I use Synaptic, I do not have that problem

caiman:/etc/apt# aptitude install sshfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
The following NEW packages will be installed:
fuse-utils{a} libfuse2{a} sshfs
The following packages will be REMOVED:
aspell{u} bluez-gnome{u} evolution-exchange{u} gnome-spell{u}
gnome-themes-extras{u} gnome-vfs-obexftp{u} libgda3-3{u}
libgda3-common{u} libgdl-1-0{u} libgdl-1-common{u} libgksu1.2-0{u}
libgksuui1.0-1{u} libgpod3{u} libmtp7{u} libopenobex1{u}
python-4suite-xml{u} python-eggtrayicon{u} python-gnome2-extras{u}
python-notify{u} rhythmbox{u} serpentine{u} system-config-printer{u}
transmission-common{u} transmission-gtk{u}
0 packages upgraded, 3 newly installed, 24 to remove and 0 not upgraded.
Need to get 181kB of archives. After unpacking 61.5MB will be freed.
Do you want to continue? [Y/n/?]
 
Old 03-05-2009, 10:11 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Well, if you look at the packages, apt-get is not going to remove any
Code:
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Aptitude may be wanting to remove them because it had marked those packages as dependencies that were automatically installed for something that has been removed from the system (i.e. this is totally unrelated to sshfs). Did you recently remove something or do a dist-upgrade?

Also, do you mix and match how you install stuff by using apt-get sometimes, aptitude sometimes, and synaptic sometimes? I've heard this is a problem and you should really stick with one tool for all your installation stuff.
 
Old 03-05-2009, 10:24 AM   #3
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
Quote:
Originally Posted by pljvaldez View Post
Well, if you look at the packages, apt-get is not going to remove any
Code:
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Aptitude may be wanting to remove them because it had marked those packages as dependencies that were automatically installed for something that has been removed from the system (i.e. this is totally unrelated to sshfs). Did you recently remove something or do a dist-upgrade?

Also, do you mix and match how you install stuff by using apt-get sometimes, aptitude sometimes, and synaptic sometimes? I've heard this is a problem and you should really stick with one tool for all your installation stuff.
I do mix and match actually.
I didn't recently removed something nor did I do a dist-upgrade.
It is a fresh install.
That is really weird because I do not recall at all that aptitude used to work like that. It is actually dangerous because I used aptitude last day to install a software and I ended up removing gnome (no less). I did not read at all the whole screen I redid my installation from scratch but then it started again.
apt-get is more subtle as it asks you for permission to remove those files.
I guess the question I have is on what basis is aptitude working to want to delete those specific files ? If, for example, I use aptitude to install another software, aptitude will decide to remove different type system softwares. On what basis it is doing that ?

Riganta
 
Old 03-05-2009, 11:02 AM   #4
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Here's a link that explains it a little bit. It's a actually a comment to an article. Looks like you can remedy the situation in aptitude by using the console gui and marking those packages as "keep". From now on, you should pick one tool and stick with it though. If used from the get go, I prefer aptitude over apt-get because it doesn't leave as much cruft on the system when you uninstall stuff.
 
Old 03-05-2009, 11:52 AM   #5
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
Thank you pljvaldez. That is all I needed to understand how aptitude was working.
 
Old 03-05-2009, 12:22 PM   #6
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
It's not weird at all.Aptitude and APT are doing what they are supposed to do.The problem is that they want to download and install newest versions of software and that's because you're using backports repo/s and packages in that repo are from testing and sid.Also,
Quote:
In some cases, the use of apt-get for installing packages instead of aptitude might make aptitude consider a package as “unused” and schedule it for removal.
When you used command
Code:
 apt-get -t lenny-backports install sshfs
it's like you've said to apt-get to not do anything but install that package and it's dependencies,that's why there was
Code:
0 upgraded, 3 newly installed, 0 to remove and 1 not upgraded
but when you used
Code:
aptitude install sshfs
there was
Code:
0 packages upgraded, 3 newly installed, 24 to remove and 0 not upgraded
because aptitude wanted to remove all conflicts because of dependencies issues.To solve your problem you need to know how APT and aptitude work and why is not a good idea to mix packages from stable,testing and unstable if you're not sure what you're doing.

Last edited by alan_ri; 03-05-2009 at 12:25 PM.
 
Old 03-06-2009, 02:44 AM   #7
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
Got you there...
I do understand that the mixing between stable, testing, and unstable is not something I want to do. Sometimes though, you have no choice because you need the most recent version of softwares. In my case for example, I defenitely need the latest of the java and flash.
Would that make my system unstable ?
Since I am using pining in my /etc/apt/preferences file, could I say that I am keeping my system stable that way ? Or at least limiting disruption from its original state ?

Here is an output of my /etc/apt/preferences

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: 800

Package: *
Pin: release a=unstable
Pin-Priority: 700

Package: sun-jav6-bin
Pin: release a=lenny-backports
Pin-Priority: 999
 
Old 03-06-2009, 07:29 AM   #8
riganta
Member
 
Registered: May 2007
Location: Cork (Ireland)
Distribution: Arch Xfce
Posts: 177

Original Poster
Rep: Reputation: 25
I have actually edited my /etc/apt/preferences file. I did a little read of "apt_preference" and if I understood well, that should allow me to remain with a stable version.

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release o=Debian
Pin-Priority: -10

Package: sun-jav6-bin
Pin: release a=lenny-backports
Pin-Priority: 999
 
Old 03-06-2009, 04:07 PM   #9
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Maybe you should install packages which are not from the stable repos manually and disable/remove backports.
I suggest that you read this and this.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get vs. aptitude freddie_leaf Debian 28 01-13-2011 06:56 AM
aptitude and apt-get (again) DavidMcCann Debian 10 02-03-2009 06:06 PM
I Can't Use 'Apt-get' And 'Aptitude' In Ubuntu - HELP!!! davidx Linux - Software 2 10-23-2008 10:07 PM
aptitude vs apt-get PCalitrack Ubuntu 3 08-08-2006 11:34 AM
aptitude .vs. apt-get thelonius Debian 12 07-25-2006 10:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration