使用 gocr 应用程序失败并出现依赖关系错误错误

使用 gocr 应用程序失败并出现依赖关系错误错误

如何使用戈克请问要将 .png 转换为 .txt 吗?

Optical Character Recognition --- gocr 0.50 20130305
 Copyright (C) 2001-2010 Joerg Schulenburg  GPG=1024D/53BDFBE3
 released under the GNU General Public License
 using: gocr [options] pnm_file_name  # use - for stdin
 options (see gocr manual pages for more details):
 -h, --help
 -i name   - input image file (pnm,pgm,pbm,ppm,pcx,...)
 -o name   - output file  (redirection of stdout)
 -e name   - logging file (redirection of stderr)
 -x name   - progress output to fifo (see manual)
 -p name   - database path including final slash (default is ./db/)
 -f fmt    - output format (ISO8859_1 TeX HTML XML UTF8 ASCII)
 -l num    - threshold grey level 0<160<=255 (0 = autodetect)
 -d num    - dust_size (remove small clusters, -1 = autodetect)
 -s num    - spacewidth/dots (0 = autodetect)
 -v num    - verbose (see manual page)
 -c string - list of chars (debugging, see manual)
 -C string - char filter (ex. hexdigits: 0-9A-Fx, only ASCII)
 -m num    - operation modes (bitpattern, see manual)
 -a num    - value of certainty (in percent, 0..100, default=95)
 -u string - output this string for every unrecognized character
 examples:
    gocr -m 4 text1.pbm                   # do layout analyzis
    gocr -m 130 -p ./database/ text1.pbm  # extend database
    djpeg -pnm -gray text.jpg | gocr -    # use jpeg-file via pipe

 webpage: http://jocr.sourceforge.net/ (may out of date)
 mirror:  http://www-e.uni-magdeburg.de/jschulen/ocr/

我试过

gocr -i 4.png -o out

错误:

sh: 1: pngtopnm: not found

ERROR pnm.c L328: unexpected EOF

然后我尝试:

sudo apt-get install netpbm

结果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libgstreamer-gl1.0-0 : Depends: libgstreamer1.0-0 (>= 1.14.5) but 1.14.1-1~ubuntu18.04.1 is to be installed
 libwebkit2gtk-4.0-37 : Depends: libjavascriptcoregtk-4.0-18 (= 2.24.2-0ubuntu0.18.04.1) but 2.22.4-0ubuntu0.18.04.1 is to be installed
 netpbm : Depends: libnetpbm10 (= 2:10.0-15.3build1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

相关内容