Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Howcan : Add self compiled program into apt-get config file, dependenc


    Hello everybody ;

    First of all, i have to say that i am very new and (also very proud) in the big linux family, i just started 10 days ago to learn about linux ;

    I also have to say that english is not my native language, please forgive me for the mistakes ;

    So, the best way to learn for me, has been to learn by myself how to compile a software from its source, it has been a very good teaching way, and Santa has been great by giving me two 700 pages linux teaching books, but :


    Here is my question, when i compil a program, lets take for exemple apache server, (yes it has been a headache to compile program without knowing any linux command!), and if my next moove is to make a comand apt-get install php5 (like i dont want to compil this one), it will tell me that it require to setup apache server as dependecie before to be able to setup Php5, the problem is that i already compil apache from its source, and its working well, i dont want apt-get to download and install again this software


    I know i can use -i option to ignore dependencies, but i would like to know if there is any way, somewhere to tell in the apt-get conf file that my apache server has already been setup in the folder /usr/local/Apache2 for exemple, and to never boring me again with this dependencie ?




    Thanks very much everybody
    Last edited by arnaudbh; 12-28-2011 at 02:11 PM.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    13,959
    When you build a package from source, the system package manager does not know that the package has been installed, so it may still give you a dependency error, mostly due to the fact that a package like Php5 which has a dependency upon some specific version of Apache, won't know that you installed it from source. In any case, you should ONLY build packages from source when either the version you need is not in your package repositories, or it is not in the repository at all.

    My advice is to NOT build packages from source when you are starting to learn about Linux, but to install them from your distribution's package repository instead, such as aptitude (apt-get), or the GUI interface Synaptic. It will be happy to install the dependencies if necessary (Apache in the case of Php5).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Hello Rubber


    Thanks for your advice but it's not really what i am looking for,


    I do really wana know if there is a way to build from source and to tell apt-get that the software is already installed in the system and to never boring me again with the dependencies ;


    About compling and not using apt-get, i have learn so much about linux in one week by trying to build apps from sources, much more than i would have done with any other tries i think, i know that apt get is a much better way to setup apps but i want to build from source, no questions;


    Anyway thanks for your reply

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    13,959
    I understood what you were asking, but chose to ignore it! I am not personally aware of a means to tell the aptitude repository that you already have Apache installed, but the fact of the matter is, is that the version you installed from source may NOT be the version you need for Php5. Building from source is fine - I do it frequently and also am a software engineer/developer on multiple systems, but you STILL need to understand how the system works before you start futzing with source builds when it is not necessary. Most source build trees have a configure script that lets you set various options, such as where to install it (/usr/local is generally the default). Example, if you want to install in /usr and not /usr/local, then you usually need to specify --prefix=/usr on the ./configure command line. This would be necessary if you want to install the package in the same locations that apt-get would use.

    As I said, since you are just starting out, keep your environment as simple as possible, and use the packages provided in the repositories as much as possible until you feel you are ready to jump off of the deep end of the pool...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Thanks again for your reply,


    Its my mistake, i just forget to say that i am not working on a production environment but on virtualbox, i dont care if the system crash or is unstable or just not coherent ; it is 100% just for learn, i use snapshots when i make some big mistakes anyway.


    I just wana try again and again until i will do it, there MUST be a way to tell this dammed apt that the software X is already installed in the path /xxxx even if the version is not correct, even if it could make lots of problems in the OS ;


    I already how to use the ./configure --prefix --enable --with --disable etc ; actually my 3 best friends are

    man -k xxx
    apt-cache search xxx
    apt-get build-dep xxx


    I have two books of 700 pages on linux on my table, but now i really would like to know how to edit apt and check what's in the engine !



    Thanks again... i will not givup until i know how to edit this apt !

  7. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    13,959
    Good reply! I see that you are moving the the right direction to accomplish what you want. FWIW, the sources to aptitude should be available, probably on the Debian web site or mirror sites. Ubuntu is a Debian derivative.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  8. #7
    Aha that sounds like a big challends, thanks for the idea ;


    But maybe you could help me by telling me which and where are the conf files used by apt (i am under ubuntu but its not really a problem if you know for deb, i guess it should not be very different, and i have "whereis" "locate" and find



    Thanks a lot

  9. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    13,959
    I think that apt-get and such use dpkg under the covers. You might want to look at dpkg-dev and related docs which should tell you how to update the repository index.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  10. #9
    Thanks for your (2nd last) reply, i can find the source of apt on debian webstite, i could also find a complete list of the files used by apt, but unfortunately as i am a new member i cannot post URL yet ;

    I'm gona study this closer !

  11. #10
    Rubber,

    Maybe you could help me for a last little thing;

    I have have the complete path of all the files used by APT, i would like to run a comand in terminal, this comand would list evey files and sort them by date of modification, like this i could find the last used files by apt, and maybe find what im looking for.


    Is that possible ... sorry i mean, its possible, but how can i do ?



    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •