YunoHost-Apps / funkwhale_ynh

A modern, convivial and free music server on YunoHost
https://funkwhale.audio/
GNU Affero General Public License v3.0
72 stars 22 forks source link

Failed to install on Debian 9, missing postgresql-contrib #36

Closed sixohsix closed 5 years ago

sixohsix commented 5 years ago

I just tried to install Funkwhale on Yunohost Debian 9 and got this failure:

Some kind of missing extension in Postgres, perhaps?

2018-10-06 14:13:57,176 INFO     moulinette.actionsmap process - processing action [30869.110]: yunohost.app.install
2018-10-06 14:14:17,168 WARNING  yunohost.hook <lambda> - [30869.110] debconf: unable to initialize frontend: Dialog
2018-10-06 14:14:17,170 WARNING  yunohost.hook <lambda> - [30869.110] debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
2018-10-06 14:14:17,171 WARNING  yunohost.hook <lambda> - [30869.110] debconf: falling back to frontend: Readline
2018-10-06 14:14:17,171 WARNING  yunohost.hook <lambda> - [30869.110] debconf: unable to initialize frontend: Readline
2018-10-06 14:14:17,172 WARNING  yunohost.hook <lambda> - [30869.110] debconf: (This frontend requires a controlling tty.)
2018-10-06 14:14:17,173 WARNING  yunohost.hook <lambda> - [30869.110] debconf: falling back to frontend: Teletype
2018-10-06 14:14:17,173 WARNING  yunohost.hook <lambda> - [30869.110] dpkg-preconfigure: unable to re-open stdin:
2018-10-06 14:14:59,102 WARNING  yunohost.hook <lambda> - [30869.110] Synchronizing state of postgresql.service with SysV service script with /lib/systemd/systemd-sysv-install.
2018-10-06 14:14:59,102 WARNING  yunohost.hook <lambda> - [30869.110] Executing: /lib/systemd/systemd-sysv-install enable postgresql
2018-10-06 14:15:02,412 WARNING  yunohost.hook <lambda> - [30869.110] 2018-10-06 14:15:02 URL:https://code.eliotberriot.com/funkwhale/funkwhale/-/archive/0.16.3/funkwhale-0.16.3.tar.bz2 [7819013] -> "app.tar.bz2" [1]
2018-10-06 14:15:03,516 WARNING  yunohost.hook <lambda> - [30869.110] 2018-10-06 14:15:03 URL:https://code.eliotberriot.com/funkwhale/funkwhale/-/jobs/8866/artifacts/download [2979266/2979266] -> "app-frontend.zip" [1]
2018-10-06 14:15:54,260 WARNING  yunohost.hook <lambda> - [30869.110] Traceback (most recent call last):
2018-10-06 14:15:54,261 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute
2018-10-06 14:15:54,261 WARNING  yunohost.hook <lambda> - [30869.110]     return self.cursor.execute(sql, params)
2018-10-06 14:15:54,262 WARNING  yunohost.hook <lambda> - [30869.110] psycopg2.OperationalError: could not open extension control file "/usr/share/postgresql/9.6/extension/unaccent.control": No such file or directory
2018-10-06 14:15:54,263 WARNING  yunohost.hook <lambda> - [30869.110] 
2018-10-06 14:15:54,263 WARNING  yunohost.hook <lambda> - [30869.110] 
2018-10-06 14:15:54,264 WARNING  yunohost.hook <lambda> - [30869.110] The above exception was the direct cause of the following exception:
2018-10-06 14:15:54,264 WARNING  yunohost.hook <lambda> - [30869.110] 
2018-10-06 14:15:54,265 WARNING  yunohost.hook <lambda> - [30869.110] Traceback (most recent call last):
2018-10-06 14:15:54,265 WARNING  yunohost.hook <lambda> - [30869.110]   File "api/manage.py", line 20, in <module>
2018-10-06 14:15:54,266 WARNING  yunohost.hook <lambda> - [30869.110]     execute_from_command_line(sys.argv)
2018-10-06 14:15:54,266 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
2018-10-06 14:15:54,267 WARNING  yunohost.hook <lambda> - [30869.110]     utility.execute()
2018-10-06 14:15:54,267 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
2018-10-06 14:15:54,267 WARNING  yunohost.hook <lambda> - [30869.110]     self.fetch_command(subcommand).run_from_argv(self.argv)
2018-10-06 14:15:54,268 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/management/base.py", line 288, in run_from_argv
2018-10-06 14:15:54,268 WARNING  yunohost.hook <lambda> - [30869.110]     self.execute(*args, **cmd_options)
2018-10-06 14:15:54,268 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/management/base.py", line 335, in execute
2018-10-06 14:15:54,269 WARNING  yunohost.hook <lambda> - [30869.110]     output = self.handle(*args, **options)
2018-10-06 14:15:54,269 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 200, in handle
2018-10-06 14:15:54,270 WARNING  yunohost.hook <lambda> - [30869.110]     fake_initial=fake_initial,
2018-10-06 14:15:54,270 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/migrations/executor.py", line 117, in migrate
2018-10-06 14:15:54,270 WARNING  yunohost.hook <lambda> - [30869.110]     state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
2018-10-06 14:15:54,271 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
2018-10-06 14:15:54,271 WARNING  yunohost.hook <lambda> - [30869.110]     state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
2018-10-06 14:15:54,271 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
2018-10-06 14:15:54,272 WARNING  yunohost.hook <lambda> - [30869.110]     state = migration.apply(state, schema_editor)
2018-10-06 14:15:54,272 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/migrations/migration.py", line 122, in apply
2018-10-06 14:15:54,272 WARNING  yunohost.hook <lambda> - [30869.110]     operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
2018-10-06 14:15:54,273 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/contrib/postgres/operations.py", line 19, in database_forwards
2018-10-06 14:15:54,273 WARNING  yunohost.hook <lambda> - [30869.110]     schema_editor.execute("CREATE EXTENSION IF NOT EXISTS %s" % schema_editor.quote_name(self.name))
2018-10-06 14:15:54,273 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 133, in execute
2018-10-06 14:15:54,273 WARNING  yunohost.hook <lambda> - [30869.110]     cursor.execute(sql, params)
2018-10-06 14:15:54,274 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/utils.py", line 68, in execute
2018-10-06 14:15:54,274 WARNING  yunohost.hook <lambda> - [30869.110]     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
2018-10-06 14:15:54,274 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/utils.py", line 77, in _execute_with_wrappers
2018-10-06 14:15:54,275 WARNING  yunohost.hook <lambda> - [30869.110]     return executor(sql, params, many, context)
2018-10-06 14:15:54,275 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute
2018-10-06 14:15:54,275 WARNING  yunohost.hook <lambda> - [30869.110]     return self.cursor.execute(sql, params)
2018-10-06 14:15:54,276 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/utils.py", line 89, in __exit__
2018-10-06 14:15:54,276 WARNING  yunohost.hook <lambda> - [30869.110]     raise dj_exc_value.with_traceback(traceback) from exc_value
2018-10-06 14:15:54,276 WARNING  yunohost.hook <lambda> - [30869.110]   File "/var/www/funkwhale/virtualenv/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute
2018-10-06 14:15:54,277 WARNING  yunohost.hook <lambda> - [30869.110]     return self.cursor.execute(sql, params)
2018-10-06 14:15:54,277 WARNING  yunohost.hook <lambda> - [30869.110] django.db.utils.OperationalError: could not open extension control file "/usr/share/postgresql/9.6/extension/unaccent.control": No such file or directory
2018-10-06 14:15:54,277 WARNING  yunohost.hook <lambda> - [30869.110] 
2018-10-06 14:15:54,578 WARNING  yunohost.hook <lambda> - [30869.110] !!
2018-10-06 14:15:54,579 WARNING  yunohost.hook <lambda> - [30869.110]   funkwhale's script has encountered an error. Its execution was cancelled.
2018-10-06 14:15:54,579 WARNING  yunohost.hook <lambda> - [30869.110] !!
2018-10-06 14:15:54,580 WARNING  yunohost.hook <lambda> - [30869.110] 
2018-10-06 14:15:54,712 INFO     yunohost.log close - [30869.110] <strong>The operation 'Install 'funkwhale' application' has failed ! To get help, please <a href="#/tools/logs/20181006-141359-app_install-funkwhale">provide the full log of this operation</a></strong>
2018-10-06 14:15:55,840 WARNING  yunohost.hook <lambda> - [30869.110] Failed to stop funkwhale.target: Unit funkwhale.target not loaded.
2018-10-06 14:15:55,841 WARNING  yunohost.hook <lambda> - [30869.110] /etc/systemd/system/funkwhale.target wasn't deleted because it doesn't exist.
2018-10-06 14:16:08,881 WARNING  yunohost.hook <lambda> - [30869.110] Remove the user funkwhale
sixohsix commented 5 years ago

Indeed, it looks like postgresql-contrib package should be added to the requirements list. It worked after I installed it.

Jibec commented 5 years ago

Hi, thanks for your report, but I just tried again, and can't reproduce your issue. Are you using raspberry? I think it was an package issue in Debian's package and fixed. Please reopen if you can reproduce this!

sixohsix commented 5 years ago

No, it wasn't Raspberry Pi. It was Debian 9 amd64, a totally fresh install.

If I am able to reproduce this I'll reopen. Thanks anyway!