在Ubuntu18.04上安装7.0.4版本,最后遇到的问题


#1

This is your configuration

server name:            sea
server ip/domain:       192.168.28.134

seafile data dir:       /home/hqking/seafile/seafile-data
fileserver port:        8082

database:               create new
ccnet database:         ccnet-db
seafile database:       seafile-db
seahub database:        seahub-db
database user:          seafile

Press ENTER to continue, or Ctrl-C to abort

Generating ccnet configuration …

done
Successly create configuration dir /home/hqking/seafile/ccnet.
Generating seafile configuration …

Done.
done
Generating seahub configuration …

Traceback (most recent call last):
File “setup-seafile-mysql.py”, line 1586, in
main()
File “setup-seafile-mysql.py”, line 1540, in main
seahub_config.generate()
File “setup-seafile-mysql.py”, line 1080, in generate
self.write_secret_key(fp)
File “setup-seafile-mysql.py”, line 1090, in write_secret_key
Utils.get_python_executable(),
File “setup-seafile-mysql.py”, line 177, in get_python_executable
return os.environ[‘PYTHON’]
File “/home/hqking/seafile/venv/lib/python2.7/UserDict.py”, line 40, in getitem
raise KeyError(key)
KeyError: ‘PYTHON’
(venv) root@hqking-virtual-machine:/home/hqking/seafile/seafile-server-7.0.5#
(venv) root@hqking-virtual-machine:/home/hqking/seafile/seafile-server-7.0.5#
(venv) root@hqking-virtual-machine:/home/hqking/seafile/seafile-server-7.0.5# ls
check_init_admin.py runtime seaf-fuse.sh seafile seahub setup-seafile-mysql.py setup-seafile.sh upgrade
reset-admin.sh seaf-fsck.sh seaf-gc.sh seafile.sh seahub.sh setup-seafile-mysql.sh sql
(venv) root@hqking-virtual-machine:/home/hqking/seafile/seafile-server-7.0.5# ./setup-seafile-mysql.sh
Checking python on this machine …
Checking python module: python-mysqldb …
python-mysqldb is not installed, Please install it first.

On Debian/Ubuntu:

sudo apt-get install python-mysqldb

不能用 ./setup-seafile-mysql.sh安装,我直接用python setup-seafile-mysql.py 安装的。中间遇到很多mysql问题,都解决了。最后一步还是报错。请求指点。


#2

你这安装方法也太不标准了,建议你使用官方提供的一键安装脚本来安装


#3

看着像是环境变量每设置 需要设置 PYTHON这个环境变量