libpostal icon indicating copy to clipboard operation
libpostal copied to clipboard

No such file or directory message

Open hamsabharathi opened this issue 6 years ago • 31 comments

Hi! image

I have tried so many combinations of directories. All of them have more than 2 GB of free space. The message I always while I execute ./configure --datadir=/c/

bash: ./configure: No such file or directory

@albarrentine , Please help

hamsabharathi avatar May 21 '18 05:05 hamsabharathi

It looks like you don't have configure script. Run ls to see the files in the current directory. If configure is missing, you probably have some autoconf routines not installed (see bootstrap script)

rinigus avatar May 21 '18 10:05 rinigus

image

configure.ac is present. Is there something else missing?

hamsabharathi avatar May 21 '18 10:05 hamsabharathi

bootstrap.sh is expected to make configure script. So, for some reasons it fails to do so

rinigus avatar May 21 '18 10:05 rinigus

I'm not able to find the reason either. It's been 2 days. The REST API also I'm unable to use due to lack of documentation

hamsabharathi avatar May 21 '18 11:05 hamsabharathi

Did you run

pacman -S autoconf automake curl git make libtool gcc mingw-w64-x86_64-gcc

, as in Win instructions? I don't know much about windows builds, working on Linux. In Linux, it all works

rinigus avatar May 21 '18 11:05 rinigus

I'm now trying it on Linux Virtualbox. What will the ./configure --datadir path be?

hamsabharathi avatar May 21 '18 11:05 hamsabharathi

wherever you want to store the data files. I have no idea on your Linux expertise. If you don't know where to store files in Linux, please read up on using Linux, its path structure, and common practices.

rinigus avatar May 21 '18 11:05 rinigus

Ok. Thank you.

hamsabharathi avatar May 21 '18 11:05 hamsabharathi

image

I was able to successfully install. But the command line interface is not working

hamsabharathi avatar May 21 '18 11:05 hamsabharathi

Also when I pip install postal

image

@rinigus

hamsabharathi avatar May 21 '18 12:05 hamsabharathi

absence of ./libpostal is no good. I presume that the make command failed at some point. Please go to main libpostal directory, run make and paste its result.

rinigus avatar May 21 '18 16:05 rinigus

image When I executed the make command inside the libpostal directory. It never went past the last line in the screenshot for 15 minutes.

hamsabharathi avatar May 22 '18 05:05 hamsabharathi

It takes time to compile it. Wait till its done

rinigus avatar May 22 '18 05:05 rinigus

And I suggest to read up on make

rinigus avatar May 22 '18 05:05 rinigus

image

The make command ran after a very long time. But when I did ./address_parser, this is what happened

hamsabharathi avatar May 22 '18 10:05 hamsabharathi

Was the make successful? It looks like it failed to download the files.

rinigus avatar May 22 '18 10:05 rinigus

image This is how the make ended. It successful returned to the command line

hamsabharathi avatar May 22 '18 11:05 hamsabharathi

did you follow https://github.com/openvenues/libpostal#installation-maclinux after make?

rinigus avatar May 22 '18 11:05 rinigus

I did sudo ldconfig

hamsabharathi avatar May 22 '18 11:05 hamsabharathi

sudo make install ?

When you want to get feedback, don't paste screenshots, but output as text.

rinigus avatar May 22 '18 11:05 rinigus

Yes. I did sudo make install. I'll keep that in mind next time

hamsabharathi avatar May 22 '18 11:05 hamsabharathi

osboxes@osboxes:~/libpostal$ sudo make install Making install in src make[1]: Entering directory /home/osboxes/libpostal/src' ./libpostal_data download all /home/downloads/libpostal Checking for new libpostal language classifier data file... libpostal language classifier data file up to date Checking for new libpostal data file... libpostal data file up to date Checking for new libpostal parser data file... libpostal parser data file up to date make[2]: Entering directory /home/osboxes/libpostal/src' /bin/mkdir -p '/usr/local/bin' /usr/bin/install -c libpostal_data '/usr/local/bin' /bin/mkdir -p '/usr/local/lib' /bin/bash ../libtool --mode=install /usr/bin/install -c libpostal.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libpostal.so.1.0.0 /usr/local/lib/libpostal.so.1.0.0 libtool: install: (cd /usr/local/lib && { ln -s -f libpostal.so.1.0.0 libpostal.so.1 || { rm -f libpostal.so.1 && ln -s libpostal.so.1.0.0 libpostal.so.1; }; }) libtool: install: (cd /usr/local/lib && { ln -s -f libpostal.so.1.0.0 libpostal.so || { rm -f libpostal.so && ln -s libpostal.so.1.0.0 libpostal.so; }; }) libtool: install: /usr/bin/install -c .libs/libpostal.lai /usr/local/lib/libpostal.la libtool: install: /usr/bin/install -c .libs/libpostal.a /usr/local/lib/libpostal.a libtool: install: chmod 644 /usr/local/lib/libpostal.a libtool: install: ranlib /usr/local/lib/libpostal.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib

Libraries have been installed in: /usr/local/lib

If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify 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 variable during execution
  • add LIBDIR to the `LD_RUN_PATH' environment variable during 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 for more information, such as the ld(1) and ld.so(8) manual pages.

/bin/mkdir -p '/usr/local/include/libpostal' /usr/bin/install -c -m 644 libpostal.h '/usr/local/include/libpostal' make[2]: Leaving directory /home/osboxes/libpostal/src' make[1]: Leaving directory /home/osboxes/libpostal/src' Making install in test make[1]: Entering directory /home/osboxes/libpostal/test' make[2]: Entering directory /home/osboxes/libpostal/test' make[2]: Nothing to be done for install-exec-am'. make[2]: Nothing to be done for install-data-am'. make[2]: Leaving directory /home/osboxes/libpostal/test' make[1]: Leaving directory /home/osboxes/libpostal/test' make[1]: Entering directory /home/osboxes/libpostal' make[2]: Entering directory /home/osboxes/libpostal' make[2]: Nothing to be done for install-exec-am'. /bin/mkdir -p '/usr/local/lib/pkgconfig' /usr/bin/install -c -m 644 libpostal.pc '/usr/local/lib/pkgconfig' make[2]: Leaving directory /home/osboxes/libpostal' make[1]: Leaving directory `/home/osboxes/libpostal'

hamsabharathi avatar May 22 '18 11:05 hamsabharathi

great! and now, in the same manner, check what you have in /home/downloads/libpostal . you should have about 1.9GB data in it:

du -sh .
1.9G	 .

and paste what was the response of ./address_parser

rinigus avatar May 22 '18 11:05 rinigus

osboxes@osboxes:/home/downloads/libpostal$ du -sh . 1.9G . osboxes@osboxes:/home/downloads/libpostal$ ./address_parser bash: ./address_parser: Is a directory osboxes@osboxes:/home/downloads/libpostal$

Yes. There is 1.9GB data

hamsabharathi avatar May 22 '18 11:05 hamsabharathi

run

src/address_parser

in the directory where you compiled libpostal. I presume its /home/osboxes/libpostal

rinigus avatar May 22 '18 12:05 rinigus

osboxes@osboxes:~/libpostal$ src/address_parser Loading models... ERR Error loading transliteration module, dir=(null) at libpostal_setup_datadir (libpostal.c:266) errno: No such file or directory osboxes@osboxes:~/libpostal$ cd src/address_parser bash: cd: src/address_parser: Not a directory osboxes@osboxes:~/libpostal$ cd src osboxes@osboxes:~/libpostal/src$ ./address_parser Loading models... ERR Error loading transliteration module, dir=(null) at libpostal_setup_datadir (libpostal.c:266) errno: No such file or directory osboxes@osboxes:~/libpostal/src$

hamsabharathi avatar May 22 '18 12:05 hamsabharathi

you may have compiled partially without specified data dir and later compiled with the data dir specified. I would suggest to do all again

make distclean

and then bootstrap, configure, and make/make install

rinigus avatar May 22 '18 12:05 rinigus

I had this problem today. My installation (Ubuntu) had worked in the past. Anyway, rinigus' suggestion to run make distclean and rebuilding fixed it for me.

jayvarner avatar Jun 07 '18 16:06 jayvarner

you may have compiled partially without specified data dir and later compiled with the data dir specified. I would suggest to do all again

make distclean

and then bootstrap, configure, and make/make install

there are a few other issues in this repo that could probably be closed out with this solution.

SeanDunford avatar Jan 28 '20 07:01 SeanDunford

make distclean didn't work. Still getting the same error.

pratt-lightbeam avatar Dec 17 '21 13:12 pratt-lightbeam