Installation: cannot find crypto library


Post #: 97
Date: 2013-03-23 08:34:19.000
Author: Darth.Severus

When I run setup-rockets.lisp I get the message
"ERR: user error : cannot find crypto library
called from user defined function module"

Tried to solve it on my own, I added some of the libsI found to setup-rocket.lisp, but it didn't help. I'm using AntiX-Linux (Mepis/Debian).

find /usr/lib -name 'libcrypto*'/usr/lib/i386-linux-gnu/libcrypto.so
/usr/lib/i386-linux-gnu/libcrypto.so.1.0.0
/usr/lib/i386-linux-gnu/libcrypto.a
/usr/lib/i386-linux-gnu/i686/cmov/libcrypto.so.1.0.0
/usr/lib/i386-linux-gnu/pkgconfig/libcrypto.pc
/usr/lib/i386-linux-gnu/i586/libcrypto.so.1.0.0
/usr/lib/libcryptopp.so.9
/usr/lib/libcrypto++.so.9
/usr/lib/libcrypto++.so.9.0.0

With apt-cache search for libcrypto I also get:
libssl1.0.0-dbg
libcryptokit-ocaml
libcrypto++-utils
...

I could play try and error by installing some of that stuff, but decided first to ask here. Maybe I'm not the first with that problem.


Rocket Man on 2013-03-23 10:14:35.000

Yeah, the default installation of newLISP doesn't seem to know where various libraries are in Ubuntu. So you have to manually add these items. I'm probably going to have to add this to setup-rockets.lisp and also mention it in a FAQ and installation instructions.

For now:

To get Rockets to work on Ubuntu, you'll have to go into the sqlite3.lsp module and add the appropriate path for where it lives on Ubuntu 64-bit:


cd /usr/share/newlisp/modules
sudo nano sqlite3.lsp


Add the following line under the list of similar lines:

"/usr/lib/x86_64-linux-gnu/libsqlite3.so" ; Ubuntu

Then do the same for crypto.lsp:

"/usr/lib/x86_64-linux-gnu/libcrypto.so.0.9.8" ; Ubuntu

And you're good to go!

Rocket Man on 2013-03-23 10:15:35.000

But in your case, the line would be: "/usr/lib/i386-linux-gnu/libcrypto.so.1.0.0"

Darth.Severus on 2013-03-23 19:01:50.000

Thanks, db creation works!
But I also added (change-dir "/home/my-user-name/path-to-Rockets") before (save "Rockets-config.lisp" 'RocketsConfig), cause first a had the wrong path.

I got a database, I used 127.0.0.1:8080 as URL and newLisp Server, but got:
"ERR: symbol expected : .36"
I added (set-locale "C") to make it work - It exists a world outside US, where some people are using commas for floating point numbers. :D

After Reloading a got a blank page. Go on trying ...

Darth.Severus on 2013-03-23 19:55:24.000

I also changed the path to my dir in rockets-main.lsp.
I also corrected the db name in rockets-common-functions.lsp.
I copied the content of bootstrap to newLISP-on-Rockets-master.
I'm going through the files but couldn't find the problem yet.
index.cgi shows a blank page. I copied the beginning of rockets-main.lsp to a file named test.cgi, if I load it in the browser it shows:
"ERR: context expected : RocketsConfig
called from user defined function display-header"

Darth.Severus on 2013-03-23 20:16:51.000

For some reason Rockets-config.lsp was deleted, so I created it again. Now my test.cgi shows a blank page instead of this error I had above. Hmm.

Oh, when I created my db there were some "errors", first I ignored them:

((0 "DarthSeverus@operamail.com" "0240eCENSOREDd6e" "49C7censored88C"
0 nil nil "Darth Severus" "3D06DE48-17C5-4FC8-86EB-9EF93A694340" nil nil nil))

Are these nils a problem? I'll go to bed now.

Rocket Man on 2013-03-25 15:45:39.000

The nils aren't a problem-- basically they are placeholders for features where there is no data for now (like date of birth, polls participated in, etc.

Generally speaking the setup script, the database, and the config file should all be in the root directory of your web site. So you run the script there, it creates the db and config file there, etc. Also always run under sudo.

Darth.Severus on 2013-03-26 18:45:53.000

I copied all files to /root, corrected some changes, new db, didn't work...
Unzipped it again, this time to /root, new db, added (set-locale "C") to newlisp-rockets.lisp, not working ...

I did it by using
sudo newlisp -http -d 8080 -w /root/newLISP-on-Rockets-master/ &
opening 127.0.0.1:8080 or 127.0.0.1:8080/index.cgi gives me a blank page
opening .lsp pages are shown as code

Hmm, the thing is, without (set-locale "C") in newlisp-rockets.lisp I get an error message which has to do with the newlisp code. So something must be working...

I guess its bootstrap or some dependencies... Will go on trying...

Darth.Severus on 2013-03-27 20:26:47.000

So, today I tried it with Hiawatha webserver to exclude nl-webserver from being the problem. I didn't get Hiawatha executing cgi in the first try. This brought me to the idea to use some cgi not from Rockets with nl-webserver. The browser was executing it, so I can be sure now my nl-webserver is executing cgi sites.

I also putted
(load "newlisp-rockets.lisp")(page-redirect "rockets-main")
to the newLisp shell, there was no error message.

I also checked the source of http://127.0.0.1:8080/index.cgi in the browser, it's a completly empty page!

Then I remembered that I got a simple 404 page if trying to load a nonexisting file, so I thought some parts of the Rockets code seem to work on my machine. But, after looking into rockets-404.lsp it turned out that this message must come from somewhere else.

There is simply no executing of any newLisp code from Rockets, but other code is executed if putted into a cgi file, same webserver, same dir, ...

I also added
#!/usr/bin/env newlisp
(set-locale "C")
(change-dir "/root/newLISP-on-Rockets-master")
to newlisp-rockets.lisp, but (not (working)).

Rocket Man on 2013-03-27 21:14:50.000

I'm not familiar with that web server, so I can't help you too much with configuration. But you should try the simplest possible Rockets program (the "Hello World" example on the About page) and see if that works. I'm not sure about changing your directory to /root/newLISP-on-Rockets-master because the idea is to execute the page in the same root directory where newlisp-rockets.lisp lives, so no change directory commands should be necessary.

View this post in the forums

Views: 5435