A
A
Anton2017-08-09 07:43:37
linux
Anton, 2017-08-09 07:43:37

How are packages versioned in linux?

As far as I know, you can install several versions of the same deb package, but then the question arises:
There is a version 1.0.0 library in which the header.h file is installed in the /opt/mylib/include/ folder
How to install the next version of the 1.0.1 library, because the new file rub the old one?
Or is it still impossible to install two packages of different versions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2017-08-09
@Riki-tiki-tavi

Or is it still impossible to install two packages of different versions?

You cannot install multiple versions of the same package at the same time.
If you need to have several versions of a program/library at the same time, they are packaged as different packages. The program/library version is often used as part of the package name.
For example, I have gcc-4.8 and gcc-4.9 installed at the same time:
$ dpkg -l 'gcc-4.[89]' | sort
+++-==============-============-============-=================================
Desired=Unknown/Install/Remove/Purge/Hold
ii  gcc-4.8        4.8.4-1      amd64        GNU C compiler
ii  gcc-4.9        4.9.2-10     amd64        GNU C compiler
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description

The package names are here: gcc-4.8 and gcc-4.9. They don't overlap anywhere in the files.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question