启动seahub.sh start报错,求救,急急急

[root@bogon seafile-server-7.1.1]# ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again
[root@bogon seafile-server-7.1.1]# ^C
[root@bogon seafile-server-7.1.1]# ./seahub.sh start-fastcgi

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/opt/seafile/seafile-server-7.1.1/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/django/core/managemen t/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/django/core/managemen t/init.py”, line 338, in execute
django.setup()
File “/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/django/init.py”, line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File “/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/django/apps/registry. py”, line 85, in populate
app_config = AppConfig.create(entry)
File "/opt/seafile/seafile-server-7.1.1/seahub/thirdpart/django/apps/config.py ", line 94, in create
module = import_module(entry)
File “/usr/local/python3/lib/python3.7/importlib/init.py”, line 127, in im port_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘captcha’
Error:Seahub failed to start.

1 个赞

这个应该是关键?
LC_ALL is not set in ENV, set to en_US.UTF-8

很明显,少了’captcha’模块,试试用sudo python3 -m pip install django-simple-captcha装上后再启动看看

2 个赞

我也遇到一样的问题,参考楼上的回答,我发现是因为“准备工作”阶段运行pip3…那句的时候用的是普通用户,也没有加sudo,所以出现了这个问题。切换到根用户重新pip3运行一遍就好了。
一个小技巧,在pip3那句后面加上 -i https://pypi.douban.com/simple 可以从豆瓣镜像下载python包,国内会比较快。

1 个赞