Fresh install not working

I’m trying a fresh install, last time I tried it was many years ago…

Anyway: I’m following this, since I can’t find any recent guide.

My OS: ubuntu 20 on virtualbox.
I installed prerequisites:

apt install nginx maria-db python python-{pip,pil,ldap,urllib3,setuptools,mysqldb,memcache,requests} libpython3.6 ffmpeg

I created the user and the 3 dbs needed correctly.

downloaded the latest seafile server tarball and started setup with setup-seafile-mysql.sh inserted all data correctly, as a test installation I setup internal lan IP as the server’s address.

All is run as user “marco”.

After starting seafile.sh (OK), seahub.sh ask me for admin email and then fails to start

Here is the output:

$ ./setup-seafile-mysql.sh
Checking python on this machine ...

-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at

        https://download.seafile.com/published/seafile-manual/home.md

Press ENTER to continue
-----------------------------------------------------------------

What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] seafile-server

What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 192.168.10.70

Which port do you want to use for the seafile fileserver?
[ default "8082" ]

-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------

[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 2

What is the host of mysql server?
[ default "localhost" ]

What is the port of mysql server?
[ default "3306" ]

Which mysql user to use for seafile?
[ mysql user for seafile ] seafile-db

What is the password for mysql user "seafile-db"?
[ password for seafile-db ]

verifying password of user seafile-db ...
Failed to connect to mysql server using user "seafile-db" and password "***": Ac                                     cess denied for user 'seafile-db'@'localhost' (using password: YES)

Which mysql user to use for seafile?
[ mysql user for seafile ] seafile

What is the password for mysql user "seafile"?
[ password for seafile ]

verifying password of user seafile ...  done

Enter the existing database name for ccnet:
[ ccnet database ] ccnet-db

verifying user "seafile" access to database ccnet-db ...  done

Enter the existing database name for seafile:
[ seafile database ] seafile-db

verifying user "seafile" access to database seafile-db ...  done

Enter the existing database name for seahub:
[ seahub database ] seahub-db

verifying user "seafile" access to database seahub-db ...  done

---------------------------------
This is your configuration
---------------------------------

    server name:            seafile-server
    server ip/domain:       192.168.10.70

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

    database:               use existing
    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/marco/ccnet.
Generating seafile configuration ...

Done.
done
Generating seahub configuration ...

----------------------------------------
Now creating ccnet database tables ...

----------------------------------------
----------------------------------------
Now creating seafile database tables ...

----------------------------------------
----------------------------------------
Now creating seahub database tables ...

----------------------------------------

creating seafile-server-latest symbolic link ...  done




-----------------------------------------------------------------
Your seafile server configuration has been finished successfully.
-----------------------------------------------------------------

run seafile server:     ./seafile.sh { start | stop | restart }
run seahub  server:     ./seahub.sh  { start <port> | stop | restart <port> }

-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------

port of seafile fileserver:   8082
port of seahub:               8000

When problems occur, Refer to

        https://download.seafile.com/published/seafile-manual/home.md

for information.


marco@seafile:~/seafile-server-7.1.5$ ./seafile.sh start

[11/13/20 10:32:22] ../common/session.c(148): using config file /home/marco/conf                                     /ccnet.conf
Starting seafile server, please wait ...
** Message: 10:32:22.233: seafile-controller.c(572): No seafevents.

Seafile server started

Done.
marco@seafile:~/seafile-server-7.1.5$ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...

----------------------------------------
It's the first time you start the seafile server. Now let's create the admin acc                                     ount
----------------------------------------

What is the email for the admin account?
[ admin email ] test@test.com

What is the password for the admin account?
[ admin password ]

Enter the password again:
[ admin password again ]



----------------------------------------
Successfully created seafile admin
----------------------------------------



Error:Seahub failed to start.
Please try to run "./seahub.sh start" again
marco@seafile:~/seafile-server-7.1.5$ ./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

Am I missing something?

From what you’ve posted, you’re missing:

For Seafile 7.1.x

# on Debian 10/Ubuntu 18.04
apt-get update
apt-get install python3 python3-setuptools python3-pip -y
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy django-pylibmc django-simple-captcha python3-ldap

(https://download.seafile.com/published/seafile-manual/deploy/using_mysql.md)

Also, the guide you’re using mentions libpython3.8 instead of 3.6 for Ubuntu 20.04.

Another way to get more information is using
./seahub.sh start-fastcgi
While fastcgi is discontinued, this gives you more details on what’s going wrong.

this gives me a lot of errors!

$ pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy django-pylibmc django-simple-captcha python3-ldap
Requirement already satisfied: Pillow in /usr/lib/python3/dist-packages (7.0.0)
Collecting pylibmc
  Downloading pylibmc-1.6.1.tar.gz (64 kB)
     |████████████████████████████████| 64 kB 1.8 MB/s 
Collecting captcha
  Downloading captcha-0.3-py3-none-any.whl (101 kB)
     |████████████████████████████████| 101 kB 4.3 MB/s 
Requirement already satisfied: jinja2 in /usr/lib/python3/dist-packages (2.10.1)
Collecting sqlalchemy
  Downloading SQLAlchemy-1.3.20-cp38-cp38-manylinux2010_x86_64.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 9.6 MB/s 
Collecting django-pylibmc
  Downloading django_pylibmc-0.6.1-py2.py3-none-any.whl (8.8 kB)
Collecting django-simple-captcha
  Downloading django-simple-captcha-0.5.13.zip (166 kB)
     |████████████████████████████████| 166 kB 3.8 MB/s 
Collecting python3-ldap
  Downloading python3_ldap-0.9.8.4-py2.py3-none-any.whl (295 kB)
     |████████████████████████████████| 295 kB 6.1 MB/s 
Collecting Django>=2.2
  Downloading Django-3.1.3-py3-none-any.whl (7.8 MB)
     |████████████████████████████████| 7.8 MB 351 bytes/s 
Collecting django-ranged-response==0.2.0
  Downloading django-ranged-response-0.2.0.tar.gz (3.0 kB)
Requirement already satisfied: six>=1.2.0 in /usr/lib/python3/dist-packages (from django-simple-captcha) (1.14.0)
Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python3/dist-packages (from python3-ldap) (0.4.2)
Collecting asgiref<4,>=3.2.10
  Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
Collecting pytz
  Downloading pytz-2020.4-py2.py3-none-any.whl (509 kB)
     |████████████████████████████████| 509 kB 4.1 MB/s 
Collecting sqlparse>=0.2.2
  Downloading sqlparse-0.4.1-py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 983 kB/s 
Building wheels for collected packages: pylibmc, django-simple-captcha, django-ranged-response
  Building wheel for pylibmc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-z5o0t_qo
       cwd: /tmp/pip-install-p1n1yp6x/pylibmc/
  Complete output (28 lines):
  /tmp/pip-install-p1n1yp6x/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
    with open("README.rst", "U", encoding="utf-8") as r:
  /tmp/pip-install-p1n1yp6x/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
    with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/__init__.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/test.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/autoconf.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/__main__.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/consts.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/client.py -> build/lib.linux-x86_64-3.8/pylibmc
  copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc
  running build_ext
  building '_pylibmc' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/src
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.linux-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
  In file included from src/_pylibmcmodule.c:34:
  src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: No such file or directory
     42 | #include <libmemcached/memcached.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pylibmc
  Running setup.py clean for pylibmc
  Building wheel for django-simple-captcha (setup.py) ... done
  Created wheel for django-simple-captcha: filename=django_simple_captcha-0.5.13-py2.py3-none-any.whl size=92676 sha256=8b88c96ce7fdc3914dc5b7833b0d9949520362790df59bdcded196970beb7347
  Stored in directory: /home/marco/.cache/pip/wheels/5c/0a/dc/4c5aa9e47660e3f95837e02547d433872bcf8b7c7b936ed160
  Building wheel for django-ranged-response (setup.py) ... done
  Created wheel for django-ranged-response: filename=django_ranged_response-0.2.0-py3-none-any.whl size=3132 sha256=a98266ca3bfe3c41ddb53b33c419e8143f4c1ccfc7f458058c58602f1f82256e
  Stored in directory: /home/marco/.cache/pip/wheels/30/aa/61/215c9adf9cad3d03b7768632b56496b9f2d7c4042f7a170d77
Successfully built django-simple-captcha django-ranged-response
Failed to build pylibmc
Installing collected packages: pylibmc, captcha, sqlalchemy, django-pylibmc, asgiref, pytz, sqlparse, Django, django-ranged-response, django-simple-captcha, python3-ldap
    Running setup.py install for pylibmc ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-kv3s_o34/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/marco/.local/include/python3.8/pylibmc
         cwd: /tmp/pip-install-p1n1yp6x/pylibmc/
    Complete output (28 lines):
    /tmp/pip-install-p1n1yp6x/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
      with open("README.rst", "U", encoding="utf-8") as r:
    /tmp/pip-install-p1n1yp6x/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
      with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/__init__.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/test.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/autoconf.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/__main__.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/consts.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/client.py -> build/lib.linux-x86_64-3.8/pylibmc
    copying src/pylibmc/pools.py -> build/lib.linux-x86_64-3.8/pylibmc
    running build_ext
    building '_pylibmc' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/src
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DUSE_ZLIB -I/usr/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.linux-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
    In file included from src/_pylibmcmodule.c:34:
    src/_pylibmcmodule.h:42:10: fatal error: libmemcached/memcached.h: No such file or directory
       42 | #include <libmemcached/memcached.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p1n1yp6x/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-kv3s_o34/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/marco/.local/include/python3.8/pylibmc Check the logs for full command output.

Because libpython3.8 is present in 20.04, 3.6 is not

It’s basically only a single error.

You need to install libmemcached-dev sudo apt install libmemcached-dev (https://packages.ubuntu.com/focal/amd64/libmemcached-dev/filelist - here you can see that this will give you the memcached.h which is required.)

Yep, it works now.

Thankyou