欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

[RK_2014_0920]ubuntu下,使用ldconfig解決:er

系統 2762 0

一、問題描述
編寫一個與libpcap有關的程序:test_libpcap.cpp,編譯test_libpcap.o成功。

注:之前已經成功安裝libpcap,libpcap.so.1.5.3的路徑是:/home/test/work/lib;
test_libpcap.cpp的路徑是/home/test/work/test_libpcap。

運行test_libpcap.o出現以下提示:

      test_libpcap.o: error 
      
        while
      
       loading shared libraries: libpcap.so.
      
        1.5
      
      .
      
        3
      
      : cannot open shared 
      
        object
      
       file: No such file or directory
    

?

二、問題解決
注:以下操作均需要root權限
1.定位“libpcap.so.1.5.3”的路徑

      # locate libpcap.so.
      
        1.5
      
      .
      
        3
      
      

/home/test/work/lib/libpcap.so.
      
        1.5
      
      .
      
        3
      
      

/usr/lib/i386-linux-gnu/libpcap.so.
      
        1.5
      
      .
      
        3
      
      

/usr/local/lib/libpcap.so.
      
        1.5
      
      .
      
        3
      
    

2.將上述路徑中的“/home/test/work/lib/libpcap.so.1.5.3”加入“/etc/ld.so.conf.d”中

      # cd /etc/
      
        ld.so.conf.d

# ls

i686
      
      -linux-
      
        gnu.conf libc.conf

# echo 
      
      
        "
      
      
        # libpcap default configuration
      
      
        "
      
       >>
      
         libpcap.conf

# echo 
      
      
        "
      
      
        /home/test/work/lib/libpcap.so.1.5.3
      
      
        "
      
       >> libpcap.conf
    

3.運行ldconfig命令

      # /sbin/ldconfig
    

4.再次運行test_libpcap.o,成功。

?

三、參考信息

1.man locate

        locate(
        
          1
        
        )                   General Commands Manual                  locate(
        
          1
        
        
          )







NAME

       locate 
        
        -
        
           find files by name





SYNOPSIS

       locate [OPTION]... PATTERN...





DESCRIPTION

       locate  reads  one or more databases prepared by updatedb(
        
        
          8
        
        
          ) and writes

       file names matching at least one of the PATTERNs  to  standard  output,

       one per line.



       If  
        
        --regex 
        
          is
        
        
           not specified, PATTERNs can contain globbing characters.

       If any PATTERN contains no globbing characters, locate  behaves  
        
        
          as
        
        
          if
        
        
          

       the pattern were 
        
        *PATTERN*
        
          .



       By 
        
        
          default
        
        , locate does not check whether files found 
        
          in
        
        
           database still

       exist (but it does require all parent directories to exist 
        
        
          if
        
        
           the data‐

       
        
        
          base
        
          was built with --require-
        
          visibility no).  locate can never report

       files created after the most recent update of the relevant database.





EXIT STATUS

       locate exits with status 
        
        
          0
        
        
          if
        
         any match was  found  or  
        
          if
        
        
            locate  was

       invoked  with  one  of the 
        
        --limit 
        
          0
        
        , --help, --statistics or --
        
          version

       options.  If no match was found  or  a  fatal  error  was  encountered,

       locate exits with status 
        
        
          1
        
        
          .



       Errors  encountered 
        
        
          while
        
        
           reading a database are not fatal, search con‐

       tinues 
        
        
          in
        
         other specified databases, 
        
          if
        
        
           any.





OPTIONS

       
        
        -A, --
        
          all

              Print only entries that match all PATTERNs instead of  requiring

              only one of them to match.





       
        
        -b, --
        
          basename

              Match  only  the 
        
        
          base
        
        
           name against the specified patterns.  This

              
        
        
          is
        
         the opposite of --
        
          wholename.





       
        
        -c, --
        
          count

              Instead of writing file names on standard output, write the num‐

              ber of matching entries only.





       
        
        -d, --
        
          database DBPATH

              Replace  the  
        
        
          default
        
         database with DBPATH.  DBPATH 
        
          is
        
         a :-
        
          sepa‐

              rated list of database file names.  If more than one  
        
        --
        
          database

              option  
        
        
          is
        
          specified,  the resulting path 
        
          is
        
        
           a concatenation of

              the separate paths.



              An empty database file name 
        
        
          is
        
         replaced by the 
        
          default
        
        
           database.

              A  database file name 
        
        -
        
           refers to the standard input.  Note that

              a database can be read 
        
        
          from
        
        
           the standard input only once.





       
        
        -e, --
        
          existing

              Print only entries that refer to  files  existing  at  the  time

              locate 
        
        
          is
        
        
           run.





       
        
        -L, --
        
          follow

              When  checking  whether files exist (
        
        
          if
        
         the --existing option 
        
          is
        
        
          

              specified), follow trailing symbolic links.  This causes  broken

              symbolic links to be omitted 
        
        
          from
        
        
           the output.



              This  
        
        
          is
        
          the  
        
          default
        
        
            behavior.  The opposite can be specified

              
        
        
          using
        
         --
        
          nofollow.





       
        
        -h, --
        
          help

              Write a summary of the available options to standard output  and

              exit successfully.





       
        
        -i, --ignore-
        
          case
        
        
          

              Ignore 
        
        
          case
        
        
           distinctions when matching patterns.





       
        
        -l, --limit, -
        
          n LIMIT

              Exit  successfully  after finding LIMIT entries.  If the 
        
        --
        
          count

              option 
        
        
          is
        
         specified, the resulting  count  
        
          is
        
        
            also  limited  to

              LIMIT.





       
        
        -m, --
        
          mmap

              Ignored, 
        
        
          for
        
        
           compatibility with BSD and GNU locate.





       
        
        -P, --nofollow, -
        
          H

              When  checking  whether files exist (
        
        
          if
        
         the --existing option 
        
          is
        
        
          

              specified), 
        
        
          do
        
        
           not follow trailing symbolic links.  This  causes

              broken symbolic links to be reported like other files.



              This 
        
        
          is
        
         the opposite of --
        
          follow.





       
        
        -
        
          0
        
        , --
        
          null
        
        
          

              Separate  the  entries  on  output 
        
        
          using
        
        
           the ASCII NUL character

              instead of writing each entry on a separate line.   This  option

              
        
        
          is
        
          designed  
        
          for
        
         interoperability with the --
        
          null
        
        
           option of GNU

              xargs(
        
        
          1
        
        
          ).





       
        
        -S, --
        
          statistics

              Write statistics about each read  database  to  standard  output

              instead of searching 
        
        
          for
        
        
           files and exit successfully.





       
        
        -q, --
        
          quiet

              Write  no  messages  about  errors encountered 
        
        
          while
        
        
           reading and

              processing databases.





       
        
        -r, --
        
          regexp REGEXP

              Search 
        
        
          for
        
         a basic regexp REGEXP.  No PATTERNs  are  allowed  
        
          if
        
        
          this
        
          option  
        
          is
        
         used, but 
        
          this
        
        
           option can be specified multiple

              times.





       
        
        --
        
          regex

              Interpret all PATTERNs 
        
        
          as
        
        
           extended regexps.





       
        
        -s, --
        
          stdio

              Ignored, 
        
        
          for
        
        
           compatibility with BSD and GNU locate.





       
        
        -V, --
        
          version

              Write information about the version and  license  of  locate  on

              standard output and exit successfully.





       
        
        -w, --
        
          wholename

              Match only the whole path name against the specified patterns.



              This  
        
        
          is
        
          the  
        
          default
        
        
            behavior.  The opposite can be specified

              
        
        
          using
        
         --
        
          basename.





EXAMPLES

       To search 
        
        
          for
        
         a file named exactly NAME (not *NAME*
        
          ), use

              locate 
        
        -b 
        
          '
        
        
          \NAME
        
        
          '
        
        
          

       Because \ 
        
        
          is
        
         a globbing character, 
        
          this
        
         disables the 
        
          implicit
        
        
            replace‐

       ment of NAME by 
        
        *NAME*
        
          .





FILES

       
        
        /
        
          var
        
        /lib/mlocate/
        
          mlocate.db

              The database searched by 
        
        
          default
        
        
          .





ENVIRONMENT

       LOCATE_PATH

              Path  to  additional databases, added after the 
        
        
          default
        
        
           database

              or the databases specified 
        
        
          using
        
         the --
        
          database option.





NOTES

       The order 
        
        
          in
        
         which the requested databases are  processed  
        
          is
        
        
            unspeci‐

       fied,  which  allows  locate  to reorder the database path 
        
        
          for
        
        
           security

       reasons.



       locate attempts to be compatible to slocate (without the  options  used

       
        
        
          for
        
          creating  databases)  and  GNU locate, 
        
          in
        
         that order.  This 
        
          is
        
        
           the

       reason 
        
        
          for
        
         the impractical 
        
          default
        
         --follow option and 
        
          for
        
        
           the  confus‐

       ing 
        
        
          set
        
         of --regex and --
        
          regexp options.



       The  
        
        
          short
        
          spelling  of  the  -r option 
        
          is
        
        
           incompatible to GNU locate,

       
        
        
          where
        
         it corresponds to the --regex option.  Use the 
        
          long
        
        
           option  names

       to avoid confusion.



       The  LOCATE_PATH  environment variable replaces the 
        
        
          default
        
         database 
        
          in
        
        
          

       BSD and GNU locate, but it 
        
        
          is
        
         added to other databases 
        
          in
        
        
          this
        
        
            imple‐

       mentation and slocate.





AUTHOR

       Miloslav Trmac 
        
        <mitr@redhat.com>
        
          





SEE ALSO

       updatedb(
        
        
          8
        
        
          )







mlocate                            Sep 
        
        
          2012
        
                                  locate(
        
          1
        
        )
      
View Code

2.man ldconfig

        LDCONFIG(
        
          8
        
        )                Linux Programmer
        
          '
        
        
          s Manual               LDCONFIG(8)
        
        
          





NAME

       ldconfig 
        
        - configure dynamic linker run-
        
          time bindings



SYNOPSIS

       
        
        /sbin/ldconfig  [  -nNvXV ] [ -f conf ] [ -C cache ] [ -
        
          r root ] direc‐

       tory ...

       
        
        /sbin/ldconfig -l [ -
        
          v ] library ...

       
        
        /sbin/ldconfig -
        
          p



DESCRIPTION

       ldconfig creates the necessary links  and  cache  to  the  most  recent

       shared  libraries  found  
        
        
          in
        
        
            the  directories specified on the command

       line, 
        
        
          in
        
         the file /etc/ld.so.conf, and 
        
          in
        
         the trusted directories (/
        
          lib

       and  
        
        /usr/lib).  The cache 
        
          is
        
         used by the run-time linker, ld.so or ld-
        
          

       linux.so.  ldconfig checks the header and filenames of the libraries it

       encounters  when  determining  which  versions  should have their links

       updated.



       ldconfig will attempt to deduce the type of ELF libs  (i.e.,  libc5  or

       libc6
        
        /glibc)  based  on  what  C  libs,  
        
          if
        
        
           any, the library was linked

       against.



       Some existing libs 
        
        
          do
        
        
           not  contain  enough  information  to  allow  the

       deduction  of  their  type.  Therefore, the 
        
        /etc/
        
          ld.so.conf file format

       allows the specification of an expected type.  This 
        
        
          is
        
          used  only  
        
          for
        
        
          

       those   ELF   libs   which   we  can  not  work  
        
        
          out
        
        .   The  format  
        
          is
        
        
          "
        
        
          dirname=TYPE
        
        
          "
        
        , 
        
          where
        
        
           TYPE can be libc4, libc5, or libc6.  (This syntax

       also works on the command line.)  Spaces are not allowed.  Also see the

       
        
        -p option.  ldconfig should normally be run by the superuser 
        
          as
        
        
           it  may

       require write permission on some root owned directories and files.



OPTIONS

       
        
        -
        
          v     Verbose  mode.   Print  current version number, the name of each

              directory 
        
        
          as
        
         it 
        
          is
        
        
           scanned, and  any  links  that  are  created.

              Overrides quiet mode.



       
        
        -n     Only  process  directories specified on the command line.  Don
        
          '
        
        
          t
        
        

              process the trusted directories (/lib and  /usr/
        
          lib)  nor  those

              specified 
        
        
          in
        
         /etc/ld.so.conf.  Implies -
        
          N.



       
        
        -N     Don
        
          '
        
        
          t rebuild the cache.  Unless -X is also specified, links are
        
        
                        still updated.



       
        
        -X     Don
        
          '
        
        
          t update links.  Unless -N is also specified, the  cache  is
        
        
                        still rebuilt.



       
        
        -
        
          f conf

              Use conf instead of 
        
        /etc/
        
          ld.so.conf.



       
        
        -
        
          C cache

              Use cache instead of 
        
        /etc/
        
          ld.so.cache.



       
        
        -
        
          r root

              Change to and use root 
        
        
          as
        
        
           the root directory.



       
        
        -l     Library mode.  Manually link individual libraries.  Intended 
        
          for
        
        
          

              use by experts only.



       
        
        -p     Print the lists of directories and candidate libraries stored 
        
          in
        
        
          

              the current cache.



FILES

       
        
        /lib/ld.so          run-time linker/
        
          loader

       
        
        /etc/ld.so.conf     File  containing  a list of colon, space, tab, 
        
          new
        
        
          ‐

                           line, or comma
        
        -separated directories  
        
          in
        
        
            which  to

                           search 
        
        
          for
        
        
           libraries.

       
        
        /etc/
        
          ld.so.cache    File  containing an ordered list of libraries found

                           
        
        
          in
        
         the directories specified 
        
          in
        
         /etc/ld.so.conf, 
        
          as
        
        
          

                           well 
        
        
          as
        
         those found 
        
          in
        
         /lib and /usr/
        
          lib.



SEE ALSO

       ldd(
        
        
          1
        
        ), ld.so(
        
          8
        
        
          )



COLOPHON

       This  page  
        
        
          is
        
          part of release 
        
          3.54
        
         of the Linux man-
        
          pages project.  A

       description of the project, and information about reporting  bugs,  can

       be found at http:
        
        
          //
        
        
          www.kernel.org/doc/man-pages/.
        
        
          





GNU                               
        
        
          2012
        
        -
        
          05
        
        -
        
          10
        
                               LDCONFIG(
        
          8
        
        )
      
View Code

?

四、原文網址[原文發布于2014-09-20 09:56]

? http://www.cnblogs.com/tom-and-jerry/p/3978092.html

?

【完結】??????????????????????

[RK_2014_0920]ubuntu下,使用ldconfig解決:error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such file or directory


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 99视频久久精品久久 | 久久亚洲春色中文字幕久久 | 国产黄色三级 | 亚洲日本高清成人aⅴ片 | 精品欧美一区二区三区久久久小说 | 91传媒蜜桃香蕉在线观看 | www成人在线观看 | 欧美精品99 | 涩涩色综合亚洲悠悠色 | 精品久久一区二区 | 欧美日韩福利视频 | 天堂在线91| 99久久久久久| 国产精品视频第一区二区三区 | 亚洲一区视频在线 | 五月婷婷丁香在线 | 中国在线播放精品区 | 亚洲精品久久久久久无码AV | 奇米影视88888 | 91网视频在线观看 | 天天躁夜夜躁狠狠躁2024 | 韩国三级中文字幕hd久久精品 | 91原创视频 | 五月天婷婷在线视频国产在线 | 国产日韩亚洲不卡高清在线观看 | 日韩卡1卡2 卡三卡2021老狼 | 精品国产91乱码一区二区三区 | 青青草原综合网 | 欧美激情免费观看一区 | 欧美一区二区三区大片 | 免费a视频在线观看 | 古装三级在线观看 | 亚洲精品在线网站 | 久久精品小视频 | 国产成人免费高清激情视频 | 国内一级一级毛片a免费 | 清纯唯美亚洲综合激情 | 欧美一级网站 | 国产精品国产三级国产aⅴ原创 | 久久精品一区二区三区不卡牛牛 | 久久亚洲欧美日韩精品专区 |