LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-15-2014, 06:07 AM   #1
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209
Blog Entries: 1

Rep: Reputation: Disabled
Help me please!!! I remove libcap package by mistake and...


I can't run commands like as:
ls, yum, rpm, ./configure, and...
The error is shown:
error while loading shared libraries: libcap.so.2: cannot open shared object file: No such file or directory
 
Old 10-15-2014, 06:40 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,895
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
How did you remove it? First recommendation is to reverse that. If you did a rm of that and a variety of files, you can run package manager to fix and force reinstallation of the appropriate packages.
 
Old 10-15-2014, 06:43 AM   #3
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
How did you remove it? First recommendation is to reverse that. If you did a rm of that and a variety of files, you can run package manager to fix and force reinstallation of the appropriate packages.
I've used rpm --nodeps -e libcap. RPM and yum doesn't work!!!
 
Old 10-15-2014, 06:55 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,800

Rep: Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568
you need another host, download the package itself, unpack and copy the file libcap.so.2 into the system. That may allow to reinstall that package. Just copying the file is not sufficient.
 
Old 10-15-2014, 06:56 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,895
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
Quote:
Originally Posted by pan64 View Post
you need another host, download the package itself, unpack and copy the file libcap.so.2 into the system. That may allow to reinstall that package. Just copying the file is not sufficient.
Either that or download the source for libpcap, then make and install it.
 
Old 10-15-2014, 07:05 AM   #6
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
you need another host, download the package itself, unpack and copy the file libcap.so.2 into the system. That may allow to reinstall that package. Just copying the file is not sufficient.
where should I copy it?
 
Old 10-15-2014, 07:10 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,800

Rep: Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568
it depends on your installation, probably: /lib/libcap.so.2 or /lib64/libcap.so.2 or /lib/x86_64-linux-gnu/libcap.so.2 or /lib/i386-linux-gnu/libcap.so.2
I'm not really sure, I would try /lib first.
 
1 members found this post helpful.
Old 10-15-2014, 07:20 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,895
Blog Entries: 13

Rep: Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945Reputation: 4945
The path should be: /usr/lib/<system-type>-linux-gnu for instance i386 as the system-type. An issue here is that if you download/install on a parallel system, you potentially need the same kernel version, at the very least you need the same libpcap version you had before. That's why I wonder if it's better to try and get the source and then build and install it on your system where the problem is.
 
1 members found this post helpful.
Old 10-15-2014, 07:32 AM   #9
massy
Member
 
Registered: Nov 2013
Distribution: CentOS 6.4
Posts: 209

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
it depends on your installation, probably: /lib/libcap.so.2 or /lib64/libcap.so.2 or /lib/x86_64-linux-gnu/libcap.so.2 or /lib/i386-linux-gnu/libcap.so.2
I'm not really sure, I would try /lib first.
Thank you, so much.. I was in a bad situation and you helped me, thank you.

Last edited by massy; 10-15-2014 at 07:33 AM.
 
Old 10-15-2014, 09:14 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,800

Rep: Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568Reputation: 7568
glad to help you

Quote:
Originally Posted by rtmistler View Post
An issue here is that if you download/install on a parallel system, you potentially need the same kernel version, at the very least you need the same libpcap version you had before.
I did not tell him to install it, just download and unpack the given package. Of course the same version - if he was able to identify.

Quote:
Originally Posted by rtmistler View Post
That's why I wonder if it's better to try and get the source and then build and install it on your system where the problem is.
I have no idea which one is the better (make/make install from source or just do that trick to be able to reinstall).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
remove libcurl by mistake! qwertyjjj Linux - Newbie 9 12-02-2011 10:48 AM
[SOLVED] won't let me install a package or remove a package archie101 Linux - Newbie 5 05-09-2011 04:52 PM
Problem Installing libcap hazdingo Linux - Software 7 08-18-2009 09:19 PM
problems with libcap meltdown_override Linux - Software 1 03-10-2007 04:51 PM
What is libcap, and how can I make sure its installed? bripage Linux - General 2 09-26-2002 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration