Reference: http://hanzratech.in/2015/01/16/ocr-using-tesseract-on-ubuntu-14-04.html
http://www.leptonica.org/download.html
- Download the newest leptonica version (1.74.1) here : http://www.leptonica.org/source/leptonica-1.74.1.tar.gz
I use wget:
1teddy@teddy-K43SJ:~/Documents/cpp$ wget http://www.leptonica.org/source/leptonica-1.74.1.tar.gz
12345678910--2017-02-03 03:22:11-- http://www.leptonica.org/source/leptonica-1.74.1.tar.gzResolving www.leptonica.org (www.leptonica.org)... 208.67.207.65Connecting to www.leptonica.org (www.leptonica.org)|208.67.207.65|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 11707064 (11M) [application/x-gzip]Saving to: ‘leptonica-1.74.1.tar.gz’100%[======================================>] 11.707.064 1,24MB/s in 12s2017-02-03 03:22:26 (978 KB/s) - ‘leptonica-1.74.1.tar.gz’ saved [11707064/11707064]
- Extract the zip file
123456teddy@teddy-K43SJ:~/Documents/cpp$ tar -zxvf leptonica-1.74.1.tar.gzleptonica-1.74.1/aclocal.m4leptonica-1.74.1/appveyor.yml...leptonica-1.74.1/style-guide.txtleptonica-1.74.1/version-notes.html - Go to the new created directory (leptonica-1.74.1) then configure
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ ./configurechecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking how to print strings... printfchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables...checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking whether gcc understands -c and -o together... yeschecking for a sed that does not truncate output... /bin/sedchecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for fgrep... /bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking whether the shell understands some XSI constructs... yeschecking whether the shell understands "+="... yeschecking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noopchecking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noopchecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for dlltool... nochecking how to associate runtime and link libraries... printf %s\nchecking for ar... archecking for archiver @FILE support... @checking for strip... stripchecking for ranlib... ranlibchecking for gawk... gawkchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for sysroot... nochecking for mt... mtchecking if mt is a manifest tool... nochecking how to run the C preprocessor... gcc -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for dlfcn.h... yeschecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... yeschecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking whether make sets $(MAKE)... yeschecking for style of include used by make... GNUchecking whether make supports nested variables... yeschecking dependency style of gcc... gcc3checking for gawk... (cached) gawkchecking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking whether gcc understands -c and -o together... (cached) yeschecking how to run the C preprocessor... gcc -Echecking whether ln -s works... yeschecking whether make sets $(MAKE)... (cached) yeschecking for cos in -lm... yeschecking for deflate in -lz... yeschecking for png_read_png in -lpng... yeschecking for jpeg_read_scanlines in -ljpeg... yeschecking for DGifOpenFileHandle in -lgif... yeschecking for TIFFOpen in -ltiff... yeschecking for WebPGetInfo in -lwebp... yeschecking for opj_create_decompress in -lopenjp2... nochecking whether make supports nested variables... (cached) yeschecking for size_t... yeschecking whether byte ordering is bigendian... nochecking whether compiler supports -Wl,--as-needed... yeschecking for fmemopen... yeschecking that generated files are newer than configure... doneconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating src/endianness.hconfig.status: creating src/Makefileconfig.status: creating prog/Makefileconfig.status: creating lept.pcconfig.status: creating config_auto.hconfig.status: executing libtool commandsconfig.status: executing depfiles commands
- make
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ makemake all-recursivemake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'Making all in srcmake[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'CC adaptmap.loCC affine.loCC affinecompose.loCC arrayaccess.loCC bardecode.loCC baseline.loCC bbuffer.loCC bilateral.loCC bilinear.loCC binarize.loCC binexpand.loCC binreduce.loCC blend.loCC bmf.loCC bmpio.loCC bmpiostub.loCC bootnumgen1.loCC bootnumgen2.loCC bootnumgen3.loCC boxbasic.loCC boxfunc1.loCC boxfunc2.loCC boxfunc3.loCC boxfunc4.loCC bytearray.loCC ccbord.loCC ccthin.loCC classapp.loCC colorcontent.loCC coloring.loCC colormap.loCC colormorph.loCC colorquant1.loCC colorquant2.loCC colorseg.loCC colorspace.loCC compare.loCC conncomp.loCC convertfiles.loCC convolve.loCC correlscore.loCC dewarp1.loCC dewarp2.loCC dewarp3.loCC dewarp4.loCC dnabasic.loCC dnafunc1.loCC dnahash.loCC dwacomb.2.loCC dwacomblow.2.loCC edge.loCC encoding.loCC enhance.loCC fhmtauto.loCC fhmtgen.1.loCC fhmtgenlow.1.loCC finditalic.loCC flipdetect.loCC fliphmtgen.loCC fmorphauto.loCC fmorphgen.1.loCC fmorphgenlow.1.loCC fpix1.loCC fpix2.loCC gifio.loCC gifiostub.loCC gplot.loCC graphics.loCC graymorph.loCC grayquant.loCC grayquantlow.loCC heap.loCC jbclass.loCC jp2kheader.loCC jp2kheaderstub.loCC jp2kio.loCC jp2kiostub.loCC jpegio.loCC jpegiostub.loCC kernel.loCC leptwin.loCC libversions.loCC list.loCC map.loCC maze.loCC morph.loCC morphapp.loCC morphdwa.loCC morphseq.loCC numabasic.loCC numafunc1.loCC numafunc2.loCC pageseg.loCC paintcmap.loCC parseprotos.loCC partition.loCC pdfio1.loCC pdfio1stub.loCC pdfio2.loCC pdfio2stub.loCC pix1.loCC pix2.loCC pix3.loCC pix4.loCC pix5.loCC pixabasic.loCC pixacc.loCC pixafunc1.loCC pixafunc2.loCC pixalloc.loCC pixarith.loCC pixcomp.loCC pixconv.loCC pixlabel.loCC pixtiling.loCC pngio.loCC pngiostub.loCC pnmio.loCC pnmiostub.loCC projective.loCC psio1.loCC psio1stub.loCC psio2.loCC psio2stub.loCC ptabasic.loCC ptafunc1.loCC ptafunc2.loCC ptra.loCC quadtree.loCC queue.loCC rank.loCC rbtree.loCC readbarcode.loCC readfile.loCC recogbasic.loCC recogdid.loCC recogident.loCC recogtrain.loCC regutils.loCC rop.loCC ropiplow.loCC roplow.loCC rotate.loCC rotateam.loCC rotateamlow.loCC rotateorth.loCC rotateshear.loCC runlength.loCC sarray1.loCC sarray2.loCC scale.loCC scalelow.loCC seedfill.loCC seedfilllow.loCC sel1.loCC sel2.loCC selgen.loCC shear.loCC skew.loCC spixio.loCC stack.loCC stringcode.loCC strokes.loCC sudoku.loCC textops.loCC tiffio.loCC tiffiostub.loCC utils1.loCC utils2.loCC warper.loCC watershed.loCC webpio.loCC webpiostub.loCC writefile.loCC zlibmem.loCC zlibmemstub.loCCLD liblept.lamake[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'Making all in progmake[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'CC convertfilestopdf.oCCLD convertfilestopdfCC convertfilestops.oCCLD convertfilestopsCC convertformat.oCCLD convertformatCC convertsegfilestopdf.oCCLD convertsegfilestopdfCC convertsegfilestops.oCCLD convertsegfilestopsCC converttopdf.oCCLD converttopdfCC converttops.oCCLD converttopsCC fileinfo.oCCLD fileinfoCC printimage.oCCLD printimageCC printsplitimage.oCCLD printsplitimageCC printtiff.oCCLD printtiffCC splitimage2pdf.oCCLD splitimage2pdfCC xtractprotos.oCCLD xtractprotosCC adaptmap_reg.oCCLD adaptmap_regCC affine_reg.oCCLD affine_regCC alphaops_reg.oCCLD alphaops_regCC alphaxform_reg.oCCLD alphaxform_regCC bilateral2_reg.oCCLD bilateral2_regCC bilinear_reg.oCCLD bilinear_regCC binarize_reg.oCCLD binarize_regCC blackwhite_reg.oCCLD blackwhite_regCC blend1_reg.oCCLD blend1_regCC blend2_reg.oCCLD blend2_regCC blend3_reg.oCCLD blend3_regCC blend4_reg.oCCLD blend4_regCC ccthin1_reg.oCCLD ccthin1_regCC ccthin2_reg.oCCLD ccthin2_regCC cmapquant_reg.oCCLD cmapquant_regCC colorcontent_reg.oCCLD colorcontent_regCC coloring_reg.oCCLD coloring_regCC colorize_reg.oCCLD colorize_regCC colormask_reg.oCCLD colormask_regCC colormorph_reg.oCCLD colormorph_regCC colorquant_reg.oCCLD colorquant_regCC colorseg_reg.oCCLD colorseg_regCC colorspace_reg.oCCLD colorspace_regCC compare_reg.oCCLD compare_regCC compfilter_reg.oCCLD compfilter_regCC conncomp_reg.oCCLD conncomp_regCC convolve_reg.oCCLD convolve_regCC dewarp_reg.oCCLD dewarp_regCC distance_reg.oCCLD distance_regCC dither_reg.oCCLD dither_regCC dna_reg.oCCLD dna_regCC dwamorph1_reg.oCC dwalinear.3.oCC dwalinearlow.3.oCCLD dwamorph1_regCC edge_reg.oCCLD edge_regCC enhance_reg.oCCLD enhance_regCC expand_reg.oCCLD expand_regCC findcorners_reg.oCCLD findcorners_regCC findpattern_reg.oCCLD findpattern_regCC fpix1_reg.oCCLD fpix1_regCC fpix2_reg.oCCLD fpix2_regCC genfonts_reg.oCCLD genfonts_regCC graymorph1_reg.oCCLD graymorph1_regCC graymorph2_reg.oCCLD graymorph2_regCC grayquant_reg.oCCLD grayquant_regCC hardlight_reg.oCCLD hardlight_regCC insert_reg.oCCLD insert_regCC ioformats_reg.oCCLD ioformats_regCC jbclass_reg.oCCLD jbclass_regCC jpegio_reg.oCCLD jpegio_regCC kernel_reg.oCCLD kernel_regCC label_reg.oCCLD label_regCC lineremoval_reg.oCCLD lineremoval_regCC logicops_reg.oCCLD logicops_regCC maze_reg.oCCLD maze_regCC multitype_reg.oCCLD multitype_regCC nearline_reg.oCCLD nearline_regCC newspaper_reg.oCCLD newspaper_regCC overlap_reg.oCCLD overlap_regCC pageseg_reg.oCCLD pageseg_regCC paint_reg.oCCLD paint_regCC paintmask_reg.oCCLD paintmask_regCC pdfseg_reg.oCCLD pdfseg_regCC pixa2_reg.oCCLD pixa2_regCC pixadisp_reg.oCCLD pixadisp_regCC pixserial_reg.oCCLD pixserial_regCC pngio_reg.oCCLD pngio_regCC pnmio_reg.oCCLD pnmio_regCC projection_reg.oCCLD projection_regCC projective_reg.oCCLD projective_regCC psio_reg.oCCLD psio_regCC psioseg_reg.oCCLD psioseg_regCC pta_reg.oCCLD pta_regCC rankbin_reg.oCCLD rankbin_regCC rankhisto_reg.oCCLD rankhisto_regCC rank_reg.oCCLD rank_regCC rasteropip_reg.oCCLD rasteropip_regCC rotate1_reg.oCCLD rotate1_regCC rotate2_reg.oCCLD rotate2_regCC rotateorth_reg.oCCLD rotateorth_regCC scale_reg.oCCLD scale_regCC seedspread_reg.oCCLD seedspread_regCC selio_reg.oCCLD selio_regCC shear1_reg.oCCLD shear1_regCC shear2_reg.oCCLD shear2_regCC skew_reg.oCCLD skew_regCC splitcomp_reg.oCCLD splitcomp_regCC subpixel_reg.oCCLD subpixel_regCC texturefill_reg.oCCLD texturefill_regCC threshnorm_reg.oCCLD threshnorm_regCC translate_reg.oCCLD translate_regCC warper_reg.oCCLD warper_regCC writetext_reg.oCCLD writetext_regCC xformbox_reg.oCCLD xformbox_regCC gifio_reg.oCCLD gifio_regCC webpio_reg.oCCLD webpio_regCC alltests_reg.oCCLD alltests_regCC adaptnorm_reg.oCCLD adaptnorm_regCC bilateral1_reg.oCCLD bilateral1_regCC binmorph1_reg.oCCLD binmorph1_regCC binmorph2_reg.oCCLD binmorph2_regCC binmorph3_reg.oCCLD binmorph3_regCC binmorph4_reg.oCCLD binmorph4_regCC binmorph5_reg.oCCLD binmorph5_regCC boxa1_reg.oCCLD boxa1_regCC boxa2_reg.oCCLD boxa2_regCC conversion_reg.oCCLD conversion_regCC dwamorph2_reg.oCCLD dwamorph2_regCC equal_reg.oCCLD equal_regCC extrema_reg.oCCLD extrema_regCC fhmtauto_reg.oCCLD fhmtauto_regCC files_reg.oCCLD files_regCC flipdetect_reg.oCCLD flipdetect_regCC fmorphauto_reg.oCCLD fmorphauto_regCC grayfill_reg.oCCLD grayfill_regCC heap_reg.oCCLD heap_regCC locminmax_reg.oCCLD locminmax_regCC lowaccess_reg.oCCLD lowaccess_regCC morphseq_reg.oCCLD morphseq_regCC numa1_reg.oCCLD numa1_regCC numa2_reg.oCCLD numa2_regCC pixa1_reg.oCCLD pixa1_regCC pixalloc_reg.oCCLD pixalloc_regCC pixcomp_reg.oCCLD pixcomp_regCC pixmem_reg.oCCLD pixmem_regCC pixtile_reg.oCCLD pixtile_regCC ptra1_reg.oCCLD ptra1_regCC ptra2_reg.oCCLD ptra2_regCC rasterop_reg.oCCLD rasterop_regCC smallpix_reg.oCCLD smallpix_regCC smoothedge_reg.oCCLD smoothedge_regCC string_reg.oCCLD string_regCC wordboxes_reg.oCCLD wordboxes_regCC adaptmap_dark.oCCLD adaptmap_darkCC arabic_lines.oCCLD arabic_linesCC arithtest.oCCLD arithtestCC autogentest1.oCCLD autogentest1CC autogentest2.oCC autogen.137.oCCLD autogentest2CC barcodetest.oCCLD barcodetestCC baselinetest.oCCLD baselinetestCC binarizefiles.oCCLD binarizefilesCC binarize_set.oCCLD binarize_setCC bincompare.oCCLD bincompareCC blendcmaptest.oCCLD blendcmaptestCC buffertest.oCCLD buffertestCC byteatest.oCCLD byteatestCC ccbordtest.oCCLD ccbordtestCC cctest1.oCCLD cctest1CC cleanpdf.oCCLD cleanpdfCC colorsegtest.oCCLD colorsegtestCC comparepages.oCCLD comparepagesCC comparepixa.oCCLD comparepixaCC comparetest.oCCLD comparetestCC concatpdf.oCCLD concatpdfCC contrasttest.oCCLD contrasttestCC converttogray.oCCLD converttograyCC cornertest.oCCLD cornertestCC croptest.oCCLD croptestCC croptext.oCCLD croptextCC dewarprules.oCCLD dewarprulesCC dewarptest1.oCCLD dewarptest1CC dewarptest2.oCCLD dewarptest2CC dewarptest3.oCCLD dewarptest3CC dewarptest4.oCCLD dewarptest4CC dewarptest5.oCCLD dewarptest5CC digitprep1.oCCLD digitprep1CC displayboxa.oCCLD displayboxaCC displayboxes_on_pixa.oCCLD displayboxes_on_pixaCC displaypix.oCCLD displaypixCC displaypixa.oCCLD displaypixaCC dwalineargen.oCCLD dwalineargenCC falsecolortest.oCCLD falsecolortestCC fcombautogen.oCCLD fcombautogenCC fhmtautogen.oCCLD fhmtautogenCC findbinding.oCCLD findbindingCC findpattern1.oCCLD findpattern1CC findpattern2.oCCLD findpattern2CC findpattern3.oCCLD findpattern3CC flipselgen.oCCLD flipselgenCC fmorphautogen.oCCLD fmorphautogenCC fpixcontours.oCCLD fpixcontoursCC gammatest.oCCLD gammatestCC gifio_leaktest.oCCLD gifio_leaktestCC graphicstest.oCCLD graphicstestCC graymorphtest.oCCLD graymorphtestCC hashtest.oCCLD hashtestCC histotest.oCCLD histotestCC htmlviewer.oCCLD htmlviewerCC iotest.oCCLD iotestCC italictest.oCCLD italictestCC jbcorrelation.oCCLD jbcorrelationCC jbrankhaus.oCCLD jbrankhausCC jbwords.oCCLD jbwordsCC listtest.oCCLD listtestCC livre_adapt.oCCLD livre_adaptCC livre_hmt.oCCLD livre_hmtCC livre_makefigs.oCCLD livre_makefigsCC livre_orient.oCCLD livre_orientCC livre_pageseg.oCCLD livre_pagesegCC livre_seedgen.oCCLD livre_seedgenCC livre_tophat.oCCLD livre_tophatCC maketile.oCCLD maketileCC maptest.oCCLD maptestCC misctest1.oCCLD misctest1CC modifyhuesat.oCCLD modifyhuesatCC morphtest1.oCCLD morphtest1CC mtifftest.oCCLD mtifftestCC numaranktest.oCCLD numaranktestCC otsutest1.oCCLD otsutest1CC otsutest2.oCCLD otsutest2CC pagesegtest1.oCCLD pagesegtest1CC pagesegtest2.oCCLD pagesegtest2CC partitiontest.oCCLD partitiontestCC pdfiotest.oCCLD pdfiotestCC percolatetest.oCCLD percolatetestCC pixaatest.oCCLD pixaatestCC pixafileinfo.oCCLD pixafileinfoCC plottest.oCCLD plottestCC quadtreetest.oCCLD quadtreetestCC rbtreetest.oCCLD rbtreetestCC recog_bootnum.oCCLD recog_bootnumCC recogsort.oCCLD recogsortCC recogtest1.oCCLD recogtest1CC reducetest.oCCLD reducetestCC removecmap.oCCLD removecmapCC renderfonts.oCCLD renderfontsCC rotatefastalt.oCCLD rotatefastaltCC rotateorthtest1.oCCLD rotateorthtest1CC rotatetest1.oCCLD rotatetest1CC runlengthtest.oCCLD runlengthtestCC scaleandtile.oCCLD scaleandtileCC scaletest1.oCCLD scaletest1CC scaletest2.oCCLD scaletest2CC seedfilltest.oCCLD seedfilltestCC settest.oCCLD settestCC sharptest.oCCLD sharptestCC sheartest.oCCLD sheartestCC showedges.oCCLD showedgesCC skewtest.oCCLD skewtestCC snapcolortest.oCCLD snapcolortestCC sorttest.oCCLD sorttestCC sudokutest.oCCLD sudokutestCC trctest.oCCLD trctestCC warpertest.oCCLD warpertestCC watershedtest.oCCLD watershedtestCC wordsinorder.oCCLD wordsinorderCC writemtiff.oCCLD writemtiffCC yuvtest.oCCLD yuvtestmake[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'
- Because my machine didn’t have ‘checkinstall’, install it first
1234567891011teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo checkinstall[sudo] password for teddy:sudo: checkinstall: command not foundteddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo apt-get install autoconf automake libtool checkinstallReading package lists... DoneBuilding dependency treeReading state information... Doneautoconf is already the newest version.automake is already the newest version....Setting up checkinstall (1.6.2-4ubuntu1) ...
- Create the package with ‘checkinstall’
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo checkinstallcheckinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz DuranThis software is released under the GNU GPL.The package documentation directory ./doc-pak does not exist.Should I create a default set of package docs? [y]:Preparing package documentation...OKPlease write a description for the package.End your description with an empty line or EOF.>> leptonica>>********************************************* Debian package creation selected ********************************************This package will be built according to these values:0 - Maintainer: [ root@teddy-K43SJ ]1 - Summary: [ leptonica ]2 - Name: [ leptonica ]3 - Version: [ 1.74.1 ]4 - Release: [ 1 ]5 - License: [ GPL ]6 - Group: [ checkinstall ]7 - Architecture: [ amd64 ]8 - Source location: [ leptonica-1.74.1 ]9 - Alternate source location: [ ]10 - Requires: [ ]11 - Provides: [ leptonica ]12 - Conflicts: [ ]13 - Replaces: [ ]Enter a number to change any of them or press ENTER to continue:Installing with make install...========================= Installation results ===========================Making install in srcmake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'/bin/mkdir -p '/usr/local/lib'/bin/bash ../libtool --mode=install /usr/bin/install -c liblept.la '/usr/local/lib'libtool: install: /usr/bin/install -c .libs/liblept.so.5.0.1 /usr/local/lib/liblept.so.5.0.1libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.1 liblept.so.5 || { rm -f liblept.so.5 && ln -s liblept.so.5.0.1 liblept.so.5; }; })libtool: install: (cd /usr/local/lib && { ln -s -f liblept.so.5.0.1 liblept.so || { rm -f liblept.so && ln -s liblept.so.5.0.1 liblept.so; }; })libtool: install: /usr/bin/install -c .libs/liblept.lai /usr/local/lib/liblept.lalibtool: install: /usr/bin/install -c .libs/liblept.a /usr/local/lib/liblept.alibtool: install: chmod 644 /usr/local/lib/liblept.alibtool: install: ranlib /usr/local/lib/liblept.alibtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/lib----------------------------------------------------------------------Libraries have been installed in:/usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the `-LLIBDIR'flag during linking and do at least one of the following:- add LIBDIR to the `LD_LIBRARY_PATH' environment variableduring execution- add LIBDIR to the `LD_RUN_PATH' environment variableduring linking- use the `-Wl,-rpath -Wl,LIBDIR' linker flag- have your system administrator add LIBDIR to `/etc/ld.so.conf'See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------/bin/mkdir -p '/usr/local/include/leptonica'/usr/bin/install -c -m 644 allheaders.h alltypes.h array.h arrayaccess.h bbuffer.h bilateral.h bmf.h bmfdata.h bmp.h ccbord.h dewarp.h endianness.h environ.h gplot.h heap.h imageio.h jbclass.h leptwin.h list.h morph.h pix.h ptra.h queue.h rbtree.h readbarcode.h recog.h regutils.h stack.h stringcode.h sudoku.h watershed.h '/usr/local/include/leptonica'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/src'Making install in progmake[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'/bin/mkdir -p '/usr/local/bin'/bin/bash ../libtool --mode=install /usr/bin/install -c convertfilestopdf convertfilestops convertformat convertsegfilestopdf convertsegfilestops converttopdf converttops fileinfo printimage printsplitimage printtiff splitimage2pdf xtractprotos '/usr/local/bin'libtool: install: /usr/bin/install -c .libs/convertfilestopdf /usr/local/bin/convertfilestopdflibtool: install: /usr/bin/install -c .libs/convertfilestops /usr/local/bin/convertfilestopslibtool: install: /usr/bin/install -c .libs/convertformat /usr/local/bin/convertformatlibtool: install: /usr/bin/install -c .libs/convertsegfilestopdf /usr/local/bin/convertsegfilestopdflibtool: install: /usr/bin/install -c .libs/convertsegfilestops /usr/local/bin/convertsegfilestopslibtool: install: /usr/bin/install -c .libs/converttopdf /usr/local/bin/converttopdflibtool: install: /usr/bin/install -c .libs/converttops /usr/local/bin/converttopslibtool: install: /usr/bin/install -c .libs/fileinfo /usr/local/bin/fileinfolibtool: install: /usr/bin/install -c .libs/printimage /usr/local/bin/printimagelibtool: install: /usr/bin/install -c .libs/printsplitimage /usr/local/bin/printsplitimagelibtool: install: /usr/bin/install -c .libs/printtiff /usr/local/bin/printtifflibtool: install: /usr/bin/install -c .libs/splitimage2pdf /usr/local/bin/splitimage2pdflibtool: install: /usr/bin/install -c .libs/xtractprotos /usr/local/bin/xtractprotosmake[2]: Nothing to be done for `install-data-am'.make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1/prog'make[1]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Entering directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[2]: Nothing to be done for `install-exec-am'./bin/mkdir -p '/usr/local/lib/pkgconfig'/usr/bin/install -c -m 644 lept.pc '/usr/local/lib/pkgconfig'make[2]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'make[1]: Leaving directory `/home/teddy/Documents/cpp/leptonica-1.74.1'======================== Installation successful ==========================Copying documentation directory...././README.md./README.htmlCopying files to the temporary directory...OKStripping ELF binaries and libraries...OKCompressing man pages...OKBuilding file list...OKBuilding Debian package...OKInstalling Debian package...OKErasing temporary files...OKWriting backup package...OKOKDeleting temp dir...OK**********************************************************************Done. The new package has been installed and saved to/home/teddy/Documents/cpp/leptonica-1.74.1/leptonica_1.74.1-1_amd64.debYou can remove it from your system anytime using:dpkg -r leptonica**********************************************************************
- Then execute ‘sudo ldconfig’
1teddy@teddy-K43SJ:~/Documents/cpp/leptonica-1.74.1$ sudo ldconfig