跳转至

Overleaf On Ubuntu

导言

还差20天(4.10)交毕业论文,在线的overleaf估计使用的人太多,直接卡死。故尝试自己安装到实验室服务器。(注意及时备份)

安装overleaf

git clone https://github.com/overleaf/toolkit.git ./overleaf
cd ./overleaf
bin/init

修改网络配置./config/overleaf.rc其中两项为如下:

SHARELATEX_LISTEN_IP=0.0.0.0
SHARELATEX_PORT=8233

运行sudo bin/up启动1, 注意你要拥有完整的root权限、并安装好了docker-compose

没有完整的root权限报错
# shaojiemike @ snode6 in ~/github/overleaf on git:master o [10:04:19] C:1
$ sudo bin/up
Initiating Mongo replica set...
[+] Running 1/0
 Container mongo  Started                                                                                                                                              0.0s Error response from daemon: Container bf6cbfe3d8fcaa5a6072b3d642bf40f8fb69df82ab6247f510f03b41a7cdecca is restarting, wait until the container is running

# shaojiemike @ snode6 in ~/github/overleaf on git:master o [10:04:32] C:1
$ sudo docker logs mongo
chown: changing ownership of '/data/db': Operation not permitted
exec /sbin/my_init: exec format error ARM机器跑不了官方的x86配置
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
sharelatex    | exec /sbin/my_init: exec format error
mongo         | {"t":{"$date":"2024-03-24T02:22:32.598+00:00"},"s":"I",  "c":"NETWORK",  "id":22943,   "ctx":"listener","msg":"Connection accepted","attr":{"remote":"127.0.0.1:51160","uuid":"7b8a9e9e-5207-4bed-91ad-9d0d4b59ace3","connectionId":7,"connectionCount":1}}
mongo         | {"t":{"$date":"2024-03-24T02:22:32.599+00:00"},"s":"I",  "c":"NETWORK",  "id":51800,   "ctx":"conn7","msg":"client metadata","attr":{"remote":"127.0.0.1:51160","client":"conn7","negotiatedCompressors":[],"doc":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"5.0.25"},"os":{"type":"Linux","name":"Ubuntu","architecture":"aarch64","version":"20.04"}}}}
mongo         | {"t":{"$date":"2024-03-24T02:22:32.609+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn7","msg":"Connection ended","attr":{"remote":"127.0.0.1:51160","uuid":"7b8a9e9e-5207-4bed-91ad-9d0d4b59ace3","connectionId":7,"connectionCount":0}}
sharelatex exited with code 1

exec /sbin/my_init: exec format error问题通常指示尝试在不兼容的CPU架构上运行二进制文件。这种错误最常见于尝试在ARM架构的机器上运行仅适用于x86架构的容器镜像,或者反之亦然。

参考文献

评论