Step 1: install Cygwin
Read this article: http://tutorialspots.com/how-to-install-ssh-daemon-on-windows-2954.html
Step 2: install apt-cyg
Read this article: http://tutorialspots.com/how-to-add-packages-after-install-cygwin-3237.html
Step 3: install tesseract
List all tesseract packages: https://cygwin.com/cgi-bin2/package-grep.cgi?grep=tesseract&arch=x86_64
Example install libtesseract ocr v5: apt-cyg install libtesseract-ocr_5
$ apt-cyg install libtesseract-ocr_5 Installing libtesseract-ocr_5 --2022-06-16 15:39:44-- http://cygwin.mirrors.hoobly.com//x86_64/release/tesser act-ocr/libtesseract-ocr_5/libtesseract-ocr_5-5.0.0-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1135096 (1.1M) [application/x-xz] Saving to: `libtesseract-ocr_5-5.0.0-1.tar.xz' libtesseract-ocr_5- 100%[===================>] 1.08M 432KB/s in 2.6s 2022-06-16 15:39:47 (432 KB/s) - `libtesseract-ocr_5-5.0.0-1.tar.xz' saved [1135 096/1135096] libtesseract-ocr_5-5.0.0-1.tar.xz: OK Unpacking... Package libtesseract-ocr_5 requires the following packages, installing: cygwin libarchive13 libcurl4 libgcc1 libgomp1 libleptonica_5 libstdc++6 Package cygwin is already installed, skipping Installing libarchive13 --2022-06-16 15:39:49-- http://cygwin.mirrors.hoobly.com//x86_64/release/libarc hive/libarchive13/libarchive13-3.6.1-1.tar.zst Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 316040 (309K) [application/x-tar] Saving to: `libarchive13-3.6.1-1.tar.zst' libarchive13-3.6.1- 100%[===================>] 308.63K 208KB/s in 1.5s 2022-06-16 15:39:51 (208 KB/s) - `libarchive13-3.6.1-1.tar.zst' saved [316040/31 6040] libarchive13-3.6.1-1.tar.zst: OK Unpacking... Package libarchive13 requires the following packages, installing: cygwin libbz2_1 libiconv2 liblz4_1 liblzma5 liblzo2_2 libssl1.1 libxml2 libzstd1 zlib0 Package cygwin is already installed, skipping Package libbz2_1 is already installed, skipping Package libiconv2 is already installed, skipping Package liblz4_1 is already installed, skipping Package liblzma5 is already installed, skipping Installing liblzo2_2 --2022-06-16 15:39:52-- http://cygwin.mirrors.hoobly.com//x86_64/release/liblzo 2/liblzo2_2/liblzo2_2-2.10-2.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 39520 (39K) [application/x-xz] Saving to: `liblzo2_2-2.10-2.tar.xz' liblzo2_2-2.10-2.ta 100%[===================>] 38.59K 120KB/s in 0.3s 2022-06-16 15:39:53 (120 KB/s) - `liblzo2_2-2.10-2.tar.xz' saved [39520/39520] liblzo2_2-2.10-2.tar.xz: OK Unpacking... Package liblzo2_2 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Package libssl1.1 is already installed, skipping Package libxml2 is already installed, skipping Package libzstd1 is already installed, skipping Package zlib0 is already installed, skipping Package libcurl4 is already installed, skipping Package libgcc1 is already installed, skipping Package libgomp1 is already installed, skipping Installing libleptonica_5 --2022-06-16 15:39:53-- http://cygwin.mirrors.hoobly.com//x86_64/release/lepton ica/libleptonica_5/libleptonica_5-1.82.0-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 984812 (962K) [application/x-xz] Saving to: `libleptonica_5-1.82.0-1.tar.xz' libleptonica_5-1.82 100%[===================>] 961.73K 376KB/s in 2.6s 2022-06-16 15:39:57 (376 KB/s) - `libleptonica_5-1.82.0-1.tar.xz' saved [984812/ 984812] libleptonica_5-1.82.0-1.tar.xz: OK Unpacking... Package libleptonica_5 requires the following packages, installing: cygwin libgif7 libjpeg8 libopenjp2_7 libpng16 libtiff6 libwebp7 libwebpmux3 zlib 0 Package cygwin is already installed, skipping Installing libgif7 --2022-06-16 15:39:57-- http://cygwin.mirrors.hoobly.com//x86_64/release/giflib /libgif7/libgif7-5.1.4-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 14508 (14K) [application/x-xz] Saving to: `libgif7-5.1.4-1.tar.xz' libgif7-5.1.4-1.tar 100%[===================>] 14.17K 44.4KB/s in 0.3s 2022-06-16 15:39:58 (44.4 KB/s) - `libgif7-5.1.4-1.tar.xz' saved [14508/14508] libgif7-5.1.4-1.tar.xz: OK Unpacking... Package libgif7 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Installing libjpeg8 --2022-06-16 15:39:59-- http://cygwin.mirrors.hoobly.com//x86_64/release/libjpe g-turbo/libjpeg8/libjpeg8-2.1.3-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 136420 (133K) [application/x-xz] Saving to: `libjpeg8-2.1.3-1.tar.xz' libjpeg8-2.1.3-1.ta 100%[===================>] 133.22K 171KB/s in 0.8s 2022-06-16 15:40:00 (171 KB/s) - `libjpeg8-2.1.3-1.tar.xz' saved [136420/136420] libjpeg8-2.1.3-1.tar.xz: OK Unpacking... Package libjpeg8 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Installing libopenjp2_7 --2022-06-16 15:40:01-- http://cygwin.mirrors.hoobly.com//x86_64/release/openjp eg2/libopenjp2_7/libopenjp2_7-2.5.0-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 135552 (132K) [application/x-xz] Saving to: `libopenjp2_7-2.5.0-1.tar.xz' libopenjp2_7-2.5.0- 100%[===================>] 132.38K 155KB/s in 0.9s 2022-06-16 15:40:02 (155 KB/s) - `libopenjp2_7-2.5.0-1.tar.xz' saved [135552/135 552] libopenjp2_7-2.5.0-1.tar.xz: OK Unpacking... Package libopenjp2_7 requires the following packages, installing: cygwin libgcc1 Package cygwin is already installed, skipping Package libgcc1 is already installed, skipping Installing libpng16 --2022-06-16 15:40:03-- http://cygwin.mirrors.hoobly.com//x86_64/release/libpng /libpng16/libpng16-1.6.37-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 171416 (167K) [application/x-xz] Saving to: `libpng16-1.6.37-1.tar.xz' libpng16-1.6.37-1.t 100%[===================>] 167.40K 160KB/s in 1.0s 2022-06-16 15:40:04 (160 KB/s) - `libpng16-1.6.37-1.tar.xz' saved [171416/171416 ] libpng16-1.6.37-1.tar.xz: OK Unpacking... Package libpng16 requires the following packages, installing: cygwin zlib0 Package cygwin is already installed, skipping Package zlib0 is already installed, skipping Installing libtiff6 --2022-06-16 15:40:05-- http://cygwin.mirrors.hoobly.com//x86_64/release/tiff/l ibtiff6/libtiff6-4.4.0-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 147396 (144K) [application/x-xz] Saving to: `libtiff6-4.4.0-1.tar.xz' libtiff6-4.4.0-1.ta 100%[===================>] 143.94K 170KB/s in 0.8s 2022-06-16 15:40:07 (170 KB/s) - `libtiff6-4.4.0-1.tar.xz' saved [147396/147396] libtiff6-4.4.0-1.tar.xz: OK Unpacking... Package libtiff6 requires the following packages, installing: cygwin libdeflate0 libjbig2 libjpeg8 liblzma5 libstdc++6 libwebp7 libzstd1 zlib0 Package cygwin is already installed, skipping Installing libdeflate0 --2022-06-16 15:40:07-- http://cygwin.mirrors.hoobly.com//x86_64/release/libdef late/libdeflate0/libdeflate0-1.11-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 33320 (33K) [application/x-xz] Saving to: `libdeflate0-1.11-1.tar.xz' libdeflate0-1.11-1. 100%[===================>] 32.54K 128KB/s in 0.3s 2022-06-16 15:40:08 (128 KB/s) - `libdeflate0-1.11-1.tar.xz' saved [33320/33320] libdeflate0-1.11-1.tar.xz: OK Unpacking... Package libdeflate0 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Installing libjbig2 --2022-06-16 15:40:09-- http://cygwin.mirrors.hoobly.com//x86_64/release/jbigki t/libjbig2/libjbig2-2.1-2.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 24548 (24K) [application/x-xz] Saving to: `libjbig2-2.1-2.tar.xz' libjbig2-2.1-2.tar. 100%[===================>] 23.97K 93.1KB/s in 0.3s 2022-06-16 15:40:09 (93.1 KB/s) - `libjbig2-2.1-2.tar.xz' saved [24548/24548] libjbig2-2.1-2.tar.xz: OK Unpacking... Package libjbig2 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Package libjpeg8 is already installed, skipping Package liblzma5 is already installed, skipping Package libstdc++6 is already installed, skipping Installing libwebp7 --2022-06-16 15:40:10-- http://cygwin.mirrors.hoobly.com//x86_64/release/libweb p/libwebp7/libwebp7-1.2.2-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 182872 (179K) [application/x-xz] Saving to: `libwebp7-1.2.2-1.tar.xz' libwebp7-1.2.2-1.ta 100%[===================>] 178.59K 170KB/s in 1.0s 2022-06-16 15:40:12 (170 KB/s) - `libwebp7-1.2.2-1.tar.xz' saved [182872/182872] libwebp7-1.2.2-1.tar.xz: OK Unpacking... Package libwebp7 requires the following packages, installing: cygwin Package cygwin is already installed, skipping Package libzstd1 is already installed, skipping Package zlib0 is already installed, skipping Package libwebp7 is already installed, skipping Installing libwebpmux3 --2022-06-16 15:40:12-- http://cygwin.mirrors.hoobly.com//x86_64/release/libweb p/libwebpmux3/libwebpmux3-1.2.2-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 16652 (16K) [application/x-xz] Saving to: `libwebpmux3-1.2.2-1.tar.xz' libwebpmux3-1.2.2-1 100%[===================>] 16.26K 60.4KB/s in 0.3s 2022-06-16 15:40:13 (60.4 KB/s) - `libwebpmux3-1.2.2-1.tar.xz' saved [16652/1665 2] libwebpmux3-1.2.2-1.tar.xz: OK Unpacking... Package libwebpmux3 requires the following packages, installing: cygwin libwebp7 Package cygwin is already installed, skipping Package libwebp7 is already installed, skipping Package zlib0 is already installed, skipping Package libstdc++6 is already installed, skipping Package libtesseract-ocr_5 installed
Example install tesseract ocr: apt-cyg install tesseract-ocr
$ apt-cyg install tesseract-ocr Installing tesseract-ocr --2022-06-16 15:50:08-- http://cygwin.mirrors.hoobly.com//x86_64/release/tesser act-ocr/tesseract-ocr-5.0.0-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 60032 (59K) [application/x-xz] Saving to: `tesseract-ocr-5.0.0-1.tar.xz' tesseract-ocr-5.0.0 100%[===================>] 58.62K 111KB/s in 0.5s 2022-06-16 15:50:10 (111 KB/s) - `tesseract-ocr-5.0.0-1.tar.xz' saved [60032/600 32] tesseract-ocr-5.0.0-1.tar.xz: OK Unpacking... Package tesseract-ocr requires the following packages, installing: cygwin libarchive13 libcurl4 libgcc1 libleptonica_5 libstdc++6 libtesseract-ocr_ 4 libtesseract-ocr_5 tesseract-ocr-eng Package cygwin is already installed, skipping Package libarchive13 is already installed, skipping Package libcurl4 is already installed, skipping Package libgcc1 is already installed, skipping Package libleptonica_5 is already installed, skipping Package libstdc++6 is already installed, skipping Installing libtesseract-ocr_4 --2022-06-16 15:50:10-- http://cygwin.mirrors.hoobly.com//x86_64/release/tesser act-ocr/libtesseract-ocr_4/libtesseract-ocr_4-4.1.1-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 1107500 (1.1M) [application/x-xz] Saving to: `libtesseract-ocr_4-4.1.1-1.tar.xz' libtesseract-ocr_4- 100%[===================>] 1.06M 343KB/s in 3.2s 2022-06-16 15:50:14 (343 KB/s) - `libtesseract-ocr_4-4.1.1-1.tar.xz' saved [1107 500/1107500] libtesseract-ocr_4-4.1.1-1.tar.xz: OK Unpacking... Package libtesseract-ocr_4 requires the following packages, installing: cygwin libarchive13 libcurl4 libgcc1 libgomp1 libleptonica_5 libstdc++6 Package cygwin is already installed, skipping Package libarchive13 is already installed, skipping Package libcurl4 is already installed, skipping Package libgcc1 is already installed, skipping Package libgomp1 is already installed, skipping Package libleptonica_5 is already installed, skipping Package libstdc++6 is already installed, skipping Package libtesseract-ocr_5 is already installed, skipping Installing tesseract-ocr-eng --2022-06-16 15:50:15-- http://cygwin.mirrors.hoobly.com//noarch/release/tesser act-ocr-languages/tesseract-ocr-eng/tesseract-ocr-eng-5.00-1.tar.xz Resolving cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)... 69.64.41.166 Connecting to cygwin.mirrors.hoobly.com (cygwin.mirrors.hoobly.com)|69.64.41.166 |:80... connected. HTTP request sent, awaiting response... 200 OK Length: 11211032 (11M) [application/x-xz] Saving to: `tesseract-ocr-eng-5.00-1.tar.xz' tesseract-ocr-eng-5 100%[===================>] 10.69M 1.70MB/s in 11s 2022-06-16 15:50:26 (1.00 MB/s) - `tesseract-ocr-eng-5.00-1.tar.xz' saved [11211 032/11211032] tesseract-ocr-eng-5.00-1.tar.xz: OK Unpacking... Package tesseract-ocr-eng requires the following packages, installing: tesseract-ocr Package tesseract-ocr is already installed, skipping Package tesseract-ocr installed
Check tesseract version:
$ tesseract --version tesseract 5.0.0 leptonica-1.82.0 libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 2.1.2) : libpng 1.6.37 : libtiff 4.4. 0 : zlib 1.2.11 : libwebp 1.2.2 : libopenjp2 2.5.0 Found AVX2 Found AVX Found FMA Found SSE4.1 Found OpenMP 201511 Found libarchive 3.6.1 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.7.5 libz std/1.5.2 Found libcurl/7.83.1 OpenSSL/1.1.1o zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2 /2.3.2 libpsl/0.21.1 (+libidn2/2.3.1) libssh2/1.10.0 nghttp2/1.47.0 libgsasl/1.8 .0 OpenLDAP/2.6.2