Ошибка в установке GOCR

Когда я пытался установить GOCR на Ubuntu Linux 11.10, я получил следующее считывание в терминале

??????????:~$ cd gocr-0.48; make install
./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for library containing pnm_readpnminit... no
 * * * try option --with-netpbm=PATH
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for an ANSI C-conforming const... yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking for wcschr... yes
checking for wcsdup... yes
checking for gettimeofday... yes
checking for popen... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating man/Makefile
config.status: creating include/config.h
make -C src install
make[1]: Entering directory `/home/drew/gocr-0.48/src'
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o pgm2asc.o pgm2asc.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o box.o box.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o database.o database.c
database.c: In function ‘ocr_db’:
database.c:411:10: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o detect.o detect.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o barcode.o barcode.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o lines.o lines.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o list.o list.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o ocr0.o ocr0.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o ocr0n.o ocr0n.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o ocr1.o ocr1.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o otsu.o otsu.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o output.o output.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o pixel.o pixel.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o unicode.o unicode.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o remove.o remove.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o pnm.o pnm.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o pcx.o pcx.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o progress.o progress.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o job.o job.c
gcc -g -O2  -I../include -DHAVE_CONFIG_H -c -o gocr.o gocr.c
# make it conform to ld --as-needed
#gcc -o gocr -lm  gocr.o ./libPgm2asc.a 
gcc -o gocr -lm  gocr.o pgm2asc.o box.o database.o detect.o barcode.o lines.o list.o ocr0.o ocr0n.o ocr1.o otsu.o output.o pixel.o unicode.o remove.o pnm.o pcx.o progress.o job.o 
if test -r gocr; then cp gocr ../bin; fi
#/usr/bin/install -c -d /usr/local/bin /usr/local /usr/local
/usr/bin/install -c -d /usr/local/bin
/usr/bin/install -c ../bin/gocr /usr/local/bin
/usr/bin/install: cannot create regular file `/usr/local/bin/gocr': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/drew/gocr-0.48/src'
make: *** [install] Error 2

Может любой помогать мне в исправлении этого. У меня был он работающий в 10.04 Спасибо, Потянул

0
задан 26 May 2012 в 14:24

2 ответа

В 12.04 вы можете установить GOCR из пакетов (sudo apt-get install gocr или из центра программного обеспечения). Подготовленные источники также доступны:

apt-get source gocr
cd gocr-0.49
dpkg-buildpackage -rfakeroot
cd ..
sudo dpkg -i gocr_0.49-1_*.deb

(Если у вас нет dpkg-buildpackage, вы можете установить его: sudo apt-get install build-essential)

Если вам нужно собрать из не-Ubuntu источник, обычно проще и безопаснее установить программное обеспечение в домашний каталог и правильно настроить пути, например:

cd gocr-0.49
./configure --prefix=${HOME}
make all install
export PATH=${PATH}:${HOME}/bin
gocr

Для другого программного обеспечения может потребоваться настройка LD_LIBRARY_PATH, PYTHONPATH и т.

0
ответ дан 26 May 2012 в 14:24
cannot create regular file `/usr/local/bin/gocr': Permission denied

означает, что у него нет прав на создание (или запись) файла. /usr/local/bin/ принадлежит root любому обычному пользователю (или пользователю рабочего стола), не имея прав, не может создавать файлы там.

Попробуйте с sudo.

сначала запустите ./configure, затем sudo make install.

0
ответ дан 26 May 2012 в 14:24

Другие вопросы по тегам:

Похожие вопросы: