I installed program (call it, for example,progA
) by building it from source code, and then finally calling sudo make install
and sudo ldconfig
.
However, it seems apt-get
hasn't gotten the memo, because when installing progB
, which depends on progA
, apt-get
recommends I also install progA
. Why is this, and what could I do?
Best Answer
TL;DR
checkinstall
is your friend ;)After a installation with
sudo make install
your package manager knows absolutely nothing about this installation. But it knows all about a package with the same name in the Ubuntu repositories or in a PPA.Use
sudo checkinstall
instead ofsudo make install
and use a higher version as the version in the repository to be sure, that your package manager accepts this version as correct dependency forProgB
.Further information:
checkinstall
is really nifty, since it follows what themake install
command would do, in order to figure out how to build a package.This means that if you install a program using
make install
, but then want to repent for your sins, all you have to do issudo checkinstall -D make install
, and that command will:follow
make install
to figure out what it doescopy-cat
make install
, except in *.deb package forminstall from the package (exactly as
make install
would have, given point 1)) except also letapt-get
know about it, and thus overwrite all the files exactly wheremake install
would have put them as long as you choose YES to include the files put bymake install
in the home directory in the package as well -- a couple of options during thecheckinstall
process will let you choose (obviously though, the choice is there so you can exercise it on a case-to-case basis)Bonus: you can also remove a package (call it
progA
again) installed usingmake install
that odes not havemake uninstall
support by following thecheckinstall
process outlined so far, and then simply doing: