LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-05-2004, 05:38 PM   #1
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Rep: Reputation: 30
Does apt-get install <package> upgrade the package if it is already installed?


Eg. I have lib-2.0 installed. If I do a apt-get install lib-2.1, will it automatically upgrade lib-2.0 that is already in my system or will it install as a separate package?

Also, will I see

ii lib-2.0
ii lib-2.1

or

ii lib-2.1 (only)

when I do a dpkg -l lib-2* ?

Thanks!
 
Old 04-05-2004, 05:43 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Depends if the lib is required for backward compatibility.

apt-get upgrade usually does the upgrading, but if this is a separate package, then there's probably a problem with just replacing it.

What lib are we talking about?
 
Old 04-05-2004, 05:44 PM   #3
comp12345
Member
 
Registered: Feb 2004
Posts: 467

Rep: Reputation: 30
It will replace the old package
 
Old 04-05-2004, 05:53 PM   #4
davidas
Member
 
Registered: Mar 2004
Distribution: Debian 'Sarge'
Posts: 168

Original Poster
Rep: Reputation: 30
Before installing g++-3.3:

||/ Name Version Description
+++-==============-==============-============================================
un g++ <none> (no description available)
un g++-2.95 <none> (no description available)
un g++-3.0 <none> (no description available)
ii g++-3.2 3.2.3-9 The GNU C++ compiler
un g++-3.3 <none> (no description available)

After installing g++-3.3:

||/ Name Version Description
+++-==============-==============-============================================
un g++ <none> (no description available)
un g++-2.95 <none> (no description available)
un g++-3.0 <none> (no description available)
ii g++-3.2 3.2.3-9 The GNU C++ compiler
ii g++-3.3 3.3.3-5 The GNU C++ compiler

After installing g++

||/ Name Version Description
+++-==============-==============-============================================
ii g++ 3.3.3-2 The GNU C++ compiler
un g++-2.95 <none> (no description available)
un g++-3.0 <none> (no description available)
ii g++-3.2 3.2.3-9 The GNU C++ compiler
ii g++-3.3 3.3.3-5 The GNU C++ compiler


Now I have three different versions of g++?

If there are 3 different versions listed in apt-cache search, what is the problem syntax to install: apt-get install <packagename only> or apt-install <packagename>-<version> ?

Eg. apt-cache search ^test

test-1.0
test-1.1
test-1.2

If I want to install test-1.2, do I use apt-get install test (just the package name only) or apt-get install test-1.2?

Thanks !

Last edited by davidas; 04-05-2004 at 05:54 PM.
 
Old 04-05-2004, 06:12 PM   #5
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
It depends. apt-get installs the version you specifiy, or if you don't specify whatever the default is. If the default package is 1.2 then yes, if its 1.1 then no. It depends on the package. Usually it the latest version but not always.

There are several packages for g++ simply because there are slight imcompatabilites and other problems. Some programs will only compile with older versions, simply because the older version has a diffrent ABI or had a non-standard behaviour thats been fixed in the newer version, but which the program used, so it fails.

g++ simply points to the g++ 3.3 package, if type the following

cd /usr/bin
ls -l g++*

you'll probably get this

g++ -> g++-3.3
g++-3.2
g++-3.3

I don't think you have 2.95, or 3.0 installed, The cache contains stuff you don't have installed, Its a listing of whats available.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
latex2e package unavailable in package manager or apt-get cesine Debian 2 07-11-2006 02:31 PM
Installed a package via rpm YaST, now overwrite-upgrade to new with source? hgb Suse/Novell 3 11-14-2005 01:13 AM
apt-rpm, SuSE 8.2 upgrade, and package conflicts bigrigdriver Linux - Software 2 05-28-2005 03:23 PM
RPM package manager says package needs to be installed. But I already installed it! nick623 Linux - Software 2 05-24-2005 02:15 AM
message "Problem during installation: x package needed for (installed) x package frayed2 Linux - Newbie 1 04-24-2005 07:05 PM


All times are GMT -5. The time now is 12:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration