Compiling vsftpd on CentOS7, getting “/usr/bin/ld: cannot find -lcap” error

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












0















I am in the process of compiling vsftpd, but keep getting this error:



[alex@lab vsftpd-3.0.3]$ make
gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o
privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o
str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o
ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o
ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o
ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o seccompsandbox.o
-Wl,-s -fPIE -pie -Wl,-z,relro -Wl,-z,now

./vsf_findlibs.sh

/usr/bin/ld: cannot find -lcap

collect2: error: ld returned 1 exit status

make: *** [vsftpd] Error 1


I installed libpcap 1.9.0, yet the error persists.










share|improve this question




























    0















    I am in the process of compiling vsftpd, but keep getting this error:



    [alex@lab vsftpd-3.0.3]$ make
    gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o
    privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o
    str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o
    ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o
    ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o
    ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o seccompsandbox.o
    -Wl,-s -fPIE -pie -Wl,-z,relro -Wl,-z,now

    ./vsf_findlibs.sh

    /usr/bin/ld: cannot find -lcap

    collect2: error: ld returned 1 exit status

    make: *** [vsftpd] Error 1


    I installed libpcap 1.9.0, yet the error persists.










    share|improve this question


























      0












      0








      0








      I am in the process of compiling vsftpd, but keep getting this error:



      [alex@lab vsftpd-3.0.3]$ make
      gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o
      privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o
      str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o
      ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o
      ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o
      ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o seccompsandbox.o
      -Wl,-s -fPIE -pie -Wl,-z,relro -Wl,-z,now

      ./vsf_findlibs.sh

      /usr/bin/ld: cannot find -lcap

      collect2: error: ld returned 1 exit status

      make: *** [vsftpd] Error 1


      I installed libpcap 1.9.0, yet the error persists.










      share|improve this question
















      I am in the process of compiling vsftpd, but keep getting this error:



      [alex@lab vsftpd-3.0.3]$ make
      gcc -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o
      privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o
      str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o
      ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o
      ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o
      ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o seccompsandbox.o
      -Wl,-s -fPIE -pie -Wl,-z,relro -Wl,-z,now

      ./vsf_findlibs.sh

      /usr/bin/ld: cannot find -lcap

      collect2: error: ld returned 1 exit status

      make: *** [vsftpd] Error 1


      I installed libpcap 1.9.0, yet the error persists.







      compiling make vsftpd






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 8 at 20:22









      Christopher

      10.6k33148




      10.6k33148










      asked Feb 8 at 19:58









      Alex TeichmannAlex Teichmann

      1




      1




















          1 Answer
          1






          active

          oldest

          votes


















          2














          Since you're building code from source, you need the libcap.so unversioned shared library. These are typically provided as part of the corresponding -devel package. If you're not sure of the package name, you can run something like:



          sudo yum install /usr/lib64/libcap.so


          Although in this case, the answer is that you simply need to install the libcap-devel package:



          sudo yum install libcap-devel





          share|improve this answer























          • That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

            – Alex Teichmann
            Feb 11 at 19:50











          • I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

            – larsks
            Feb 11 at 21:34











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          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%2f499550%2fcompiling-vsftpd-on-centos7-getting-usr-bin-ld-cannot-find-lcap-error%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Since you're building code from source, you need the libcap.so unversioned shared library. These are typically provided as part of the corresponding -devel package. If you're not sure of the package name, you can run something like:



          sudo yum install /usr/lib64/libcap.so


          Although in this case, the answer is that you simply need to install the libcap-devel package:



          sudo yum install libcap-devel





          share|improve this answer























          • That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

            – Alex Teichmann
            Feb 11 at 19:50











          • I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

            – larsks
            Feb 11 at 21:34
















          2














          Since you're building code from source, you need the libcap.so unversioned shared library. These are typically provided as part of the corresponding -devel package. If you're not sure of the package name, you can run something like:



          sudo yum install /usr/lib64/libcap.so


          Although in this case, the answer is that you simply need to install the libcap-devel package:



          sudo yum install libcap-devel





          share|improve this answer























          • That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

            – Alex Teichmann
            Feb 11 at 19:50











          • I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

            – larsks
            Feb 11 at 21:34














          2












          2








          2







          Since you're building code from source, you need the libcap.so unversioned shared library. These are typically provided as part of the corresponding -devel package. If you're not sure of the package name, you can run something like:



          sudo yum install /usr/lib64/libcap.so


          Although in this case, the answer is that you simply need to install the libcap-devel package:



          sudo yum install libcap-devel





          share|improve this answer













          Since you're building code from source, you need the libcap.so unversioned shared library. These are typically provided as part of the corresponding -devel package. If you're not sure of the package name, you can run something like:



          sudo yum install /usr/lib64/libcap.so


          Although in this case, the answer is that you simply need to install the libcap-devel package:



          sudo yum install libcap-devel






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 8 at 20:43









          larskslarsks

          11.3k33042




          11.3k33042












          • That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

            – Alex Teichmann
            Feb 11 at 19:50











          • I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

            – larsks
            Feb 11 at 21:34


















          • That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

            – Alex Teichmann
            Feb 11 at 19:50











          • I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

            – larsks
            Feb 11 at 21:34

















          That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

          – Alex Teichmann
          Feb 11 at 19:50





          That makes sense! However - I should have mentioned this in my first post - I am working on a system that is not connected to the Internet. Hence me downloading the necessary library tar files and transferring them onto the target system manually. On the target system, I then run make, which leads me to the error.

          – Alex Teichmann
          Feb 11 at 19:50













          I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

          – larsks
          Feb 11 at 21:34






          I don't think that changes the nature of the error or the solution. Download the libcap-devel package, transfer it to the target system, and install it. However, you should also be able to create a symlink to the existing versioned library, like ln -s libcap.so.2 /usr/lib64/libcap.so.

          – larsks
          Feb 11 at 21:34


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f499550%2fcompiling-vsftpd-on-centos7-getting-usr-bin-ld-cannot-find-lcap-error%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay