How to find where a library is installed?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite
1












I have installed libgoogle-perftools-dev via software center in Ubuntu 12.04. As suggested by http://pj.freefaculty.org/blog/?p=140, I want to add to my cpp file:



#include <gperftools/profiler.h>


But the compiler says



 gperftools/profiler.h: No such file or directory


I tried to find where it is:



$ locate -i gperftools


no return, and



$ locate -i "profiler.h"


returns



/usr/include/c++/4.6/profile/impl/profiler.h
/usr/src/linux-headers-3.2.0-23-generic-pae/include/config/function/profiler.h


which I am not sure if are for gperftools.



So I wonder how to find



  • where libgoogle-perftools-dev is installed?

  • where gperftools/profiler.h is located?









share|improve this question



























    up vote
    5
    down vote

    favorite
    1












    I have installed libgoogle-perftools-dev via software center in Ubuntu 12.04. As suggested by http://pj.freefaculty.org/blog/?p=140, I want to add to my cpp file:



    #include <gperftools/profiler.h>


    But the compiler says



     gperftools/profiler.h: No such file or directory


    I tried to find where it is:



    $ locate -i gperftools


    no return, and



    $ locate -i "profiler.h"


    returns



    /usr/include/c++/4.6/profile/impl/profiler.h
    /usr/src/linux-headers-3.2.0-23-generic-pae/include/config/function/profiler.h


    which I am not sure if are for gperftools.



    So I wonder how to find



    • where libgoogle-perftools-dev is installed?

    • where gperftools/profiler.h is located?









    share|improve this question

























      up vote
      5
      down vote

      favorite
      1









      up vote
      5
      down vote

      favorite
      1






      1





      I have installed libgoogle-perftools-dev via software center in Ubuntu 12.04. As suggested by http://pj.freefaculty.org/blog/?p=140, I want to add to my cpp file:



      #include <gperftools/profiler.h>


      But the compiler says



       gperftools/profiler.h: No such file or directory


      I tried to find where it is:



      $ locate -i gperftools


      no return, and



      $ locate -i "profiler.h"


      returns



      /usr/include/c++/4.6/profile/impl/profiler.h
      /usr/src/linux-headers-3.2.0-23-generic-pae/include/config/function/profiler.h


      which I am not sure if are for gperftools.



      So I wonder how to find



      • where libgoogle-perftools-dev is installed?

      • where gperftools/profiler.h is located?









      share|improve this question















      I have installed libgoogle-perftools-dev via software center in Ubuntu 12.04. As suggested by http://pj.freefaculty.org/blog/?p=140, I want to add to my cpp file:



      #include <gperftools/profiler.h>


      But the compiler says



       gperftools/profiler.h: No such file or directory


      I tried to find where it is:



      $ locate -i gperftools


      no return, and



      $ locate -i "profiler.h"


      returns



      /usr/include/c++/4.6/profile/impl/profiler.h
      /usr/src/linux-headers-3.2.0-23-generic-pae/include/config/function/profiler.h


      which I am not sure if are for gperftools.



      So I wonder how to find



      • where libgoogle-perftools-dev is installed?

      • where gperftools/profiler.h is located?






      package-management






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 15 '14 at 4:32









      Braiam

      22.7k1972133




      22.7k1972133










      asked May 15 '14 at 4:14









      Tim

      23.9k67232418




      23.9k67232418




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          8
          down vote



          accepted










          Probably the issue with the locate command is that the database has not yet been updated to reflect the newly-installed package files. You could force an update (sudo updatedb) or use the find command instead, but probably the easiest solution on systems like Ubuntu that use the dpkg package management tools is to list the package contents



          dpkg -L libgoogle-perftools-dev


          or to check for the profiler.h file location specifically



          dpkg -L libgoogle-perftools-dev | grep 'profiler.h'





          share|improve this answer



























            up vote
            2
            down vote













            Usually, pkg-config helps in most of these cases
            pkg-config --list-all lists packages that are "known" to your system. And then pkg-config --libs --cflags <package> is good enough to provide linker and include information.






            share|improve this answer






















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f129445%2fhow-to-find-where-a-library-is-installed%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              8
              down vote



              accepted










              Probably the issue with the locate command is that the database has not yet been updated to reflect the newly-installed package files. You could force an update (sudo updatedb) or use the find command instead, but probably the easiest solution on systems like Ubuntu that use the dpkg package management tools is to list the package contents



              dpkg -L libgoogle-perftools-dev


              or to check for the profiler.h file location specifically



              dpkg -L libgoogle-perftools-dev | grep 'profiler.h'





              share|improve this answer
























                up vote
                8
                down vote



                accepted










                Probably the issue with the locate command is that the database has not yet been updated to reflect the newly-installed package files. You could force an update (sudo updatedb) or use the find command instead, but probably the easiest solution on systems like Ubuntu that use the dpkg package management tools is to list the package contents



                dpkg -L libgoogle-perftools-dev


                or to check for the profiler.h file location specifically



                dpkg -L libgoogle-perftools-dev | grep 'profiler.h'





                share|improve this answer






















                  up vote
                  8
                  down vote



                  accepted







                  up vote
                  8
                  down vote



                  accepted






                  Probably the issue with the locate command is that the database has not yet been updated to reflect the newly-installed package files. You could force an update (sudo updatedb) or use the find command instead, but probably the easiest solution on systems like Ubuntu that use the dpkg package management tools is to list the package contents



                  dpkg -L libgoogle-perftools-dev


                  or to check for the profiler.h file location specifically



                  dpkg -L libgoogle-perftools-dev | grep 'profiler.h'





                  share|improve this answer












                  Probably the issue with the locate command is that the database has not yet been updated to reflect the newly-installed package files. You could force an update (sudo updatedb) or use the find command instead, but probably the easiest solution on systems like Ubuntu that use the dpkg package management tools is to list the package contents



                  dpkg -L libgoogle-perftools-dev


                  or to check for the profiler.h file location specifically



                  dpkg -L libgoogle-perftools-dev | grep 'profiler.h'






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 15 '14 at 4:30









                  steeldriver

                  32.8k34981




                  32.8k34981






















                      up vote
                      2
                      down vote













                      Usually, pkg-config helps in most of these cases
                      pkg-config --list-all lists packages that are "known" to your system. And then pkg-config --libs --cflags <package> is good enough to provide linker and include information.






                      share|improve this answer


























                        up vote
                        2
                        down vote













                        Usually, pkg-config helps in most of these cases
                        pkg-config --list-all lists packages that are "known" to your system. And then pkg-config --libs --cflags <package> is good enough to provide linker and include information.






                        share|improve this answer
























                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          Usually, pkg-config helps in most of these cases
                          pkg-config --list-all lists packages that are "known" to your system. And then pkg-config --libs --cflags <package> is good enough to provide linker and include information.






                          share|improve this answer














                          Usually, pkg-config helps in most of these cases
                          pkg-config --list-all lists packages that are "known" to your system. And then pkg-config --libs --cflags <package> is good enough to provide linker and include information.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited 16 mins ago









                          mosvy

                          2,137113




                          2,137113










                          answered May 15 '14 at 12:01









                          tpb261

                          1212




                          1212



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f129445%2fhow-to-find-where-a-library-is-installed%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              Peggy Mitchell

                              Palaiologos

                              The Forum (Inglewood, California)