It seemed that I didn't install the leveldb well, which is likely because my vps is in China as there is GFW.
sudo cp --preserve=links out-shared/libleveldb.so* /usr/local/lib
sudo cp -r include/leveldb /usr/local/include
This time "make all" went well, and so did "make test".
But when I "make runtest", there was a new error:
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries: libleveldb.so.1: cannot open shared object file: No such file or directory
make: *** [runtest] Error 127
It said cannot open libleveldb.so.1, but there are libleveldb.so, libleveldb.so.1, libleveldb.so.1.19 in the /usr/local/lib directory.
I don't know how to solve this problem and need some help.
Thank you for reading!