Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu 10.04. I've accidentally deleted the jni folder in /usr/lib/ by using the root terminal.

Is there any way that I can reinstall these files?, or should I reload Ubuntu?. I've tried copying files from another laptop (same make ,Configuration as mine) but 2 files were not being copied.

share|improve this question

2 Answers 2

The files in /usr/lib/jni were all installed by various Ubuntu packages and they can be restored by reinstalling those packages. You can reinstall a package with a command like:

sudo apt-get install --reinstall <packagename>

where <packagename> is the name of the package you want to reinstall.

Figuring out which packages you need to reinstall might be a little tricky, because it looks like multiple packages install files in /usr/lib/jni. You can probably get a rough idea of the packages to reinstall with this command:

dpkg -l | grep jni

That will list the packages you have installed with jni in their names. I would start by reinstalling each of those packages and see if it fixes your problem.

share|improve this answer
    
actually i deleted the folder name JNI from the /usr/lib –  karan Jun 15 '11 at 13:13
    
Reinstalling the package that is related to it will repair the folder structure, as it unpacks all the files from the initial .deb installer (which should contain the folder you deleted) –  Thomas W. Jun 15 '11 at 13:15
    
Yes, you need to reinstall the packages that originally installed the files in /usr/lib/jni that you deleted. I'll edit my answer to clarify. –  Ben Williams Jun 15 '11 at 13:53

Find the JNI package name then run this command in terminal:

apt-get --reinstall install PACKAGE_NAME

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.