lambdaX / python-tesseract

Automatically exported from code.google.com/p/python-tesseract
0 stars 0 forks source link

deb packages depend on leptonica, not libleptonica #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On a clean Ubuntu install, follow the steps here doesn't work:
http://code.google.com/p/python-tesseract/wiki/HowToInstallPythonTesseractDeb

the error is:
 tesseract-ocr depends on leptonica; however:
  Package leptonica is not installed.

One option to fix is using the nutznboltz ppa that provides leptonica, but not 
for 11.10 oneiric and also the leptonica in oneiric itself is 1.68 already.

Workaround:
sudo apt-get install libleptonica
sudo dpkg -i --ignore-depends=leptonica /tmp/tesseract*.deb 
/tmp/python-tesseract_0.7-1.1_amd64.deb

This works just fine. Please change the dependency on leptonica to libleptonica.

Original issue reported on code.google.com by sander.k...@gmail.com on 21 Feb 2012 at 1:40

GoogleCodeExporter commented 9 years ago
This brings more problems than just installing.
APT says I have both python-tesseract and tesseract-ocr packages broken because 
the leptonica dependency, and even the system update wants to remove these 
packages because of it.
Running linux mint 12

Original comment by pimentel...@gmail.com on 9 Mar 2012 at 11:23

GoogleCodeExporter commented 9 years ago
You're right actually, this is not a good solution. But it shows that the 
packages *could* easily depend on the stock libleptonica package and work.

What I ended up doing was patching the debs provided here to depend on 
libleptonica rather than leptonica.

To do that, run the following commands for each .deb file (replacing 
packagename below with the package name):

#extract package contents
dpkg-deb -x pkgname.deb pkgname;
#extract CONTROL file from deb
dpkg-deb --control pkgname.deb pkgname/DEBIAN;
#replace leptonica dependency with libleptonica
sed -i "s/leptonica/libleptonica (>= 1\.68)/g" pkgname/DEBIAN/control;
#rebuild package with correct dependencies
dpkg -b pkgname pkgname.deb;

that will give you nice deb packages depending on libleptonica rather than 
leptonica

Original comment by sander.k...@gmail.com on 9 Mar 2012 at 11:43

GoogleCodeExporter commented 9 years ago
Works like a charm. Thanks a lot!

Original comment by pimentel...@gmail.com on 9 Mar 2012 at 3:44

GoogleCodeExporter commented 9 years ago
Interesting workaround...

Anyhow, I have fixed the problem. 

Thanks anyway

Original comment by FreeT...@gmail.com on 12 Apr 2012 at 3:42

GoogleCodeExporter commented 9 years ago
Interesting workaround...

Anyhow, I have fixed the problem. 

Thanks anyway

Original comment by FreeT...@gmail.com on 12 Apr 2012 at 3:42

GoogleCodeExporter commented 9 years ago
Interesting workaround...

Anyhow, I have fixed the problem. 

Thanks anyway

Original comment by FreeT...@gmail.com on 12 Apr 2012 at 3:42

GoogleCodeExporter commented 9 years ago
Interesting workaround...

Anyhow, I have fixed the problem. 

Thanks anyway

Original comment by FreeT...@gmail.com on 12 Apr 2012 at 3:42

GoogleCodeExporter commented 9 years ago
Tesseract-ocr is now included in the download list
http://code.google.com/p/python-tesseract/downloads/list

Original comment by FreeT...@gmail.com on 12 Apr 2012 at 3:42