Skip to content

How other snaps can use PostgreSQL snap via slots? #55

@troyanov

Description

@troyanov

Hello folks,

I was trying to reuse psql (since now bins are exposed via slots #44)

Here is the plug from my snap:

plugs:
  postgresql:
    interface: content
    content: bins
    target: $SNAP/opt/postgresql

The very first attempt failed:

$SNAP/opt/postgresql/usr/bin/psql
Can't locate PgCommon.pm in @INC (you may need to install the PgCommon module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /snap/app/x1/opt/postgresql/usr/bin/psql line 22.
BEGIN failed--compilation aborted at /snap/app/x1/opt/postgresql/usr/bin/psql line 22.

Setting the env for Perl helps a bit PERL5LIB=$SNAP/opt/postgresql/usr/share/perl5:$PERL5LIB
But then I hit another error:

$SNAP/opt/postgresql/usr/bin/psql -h 127.0.0.1
Error: You must install at least one postgresql-client-<version> package

I am curious if you can give some hints on how it should be used?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions