Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keter setting up file is not working #206

Open
fmarquez199 opened this issue Aug 31, 2020 · 9 comments
Open

Keter setting up file is not working #206

fmarquez199 opened this issue Aug 31, 2020 · 9 comments

Comments

@fmarquez199
Copy link

I'm trying to setting up keter in my server but I got this:

# wget -O - https://raw.githubusercontent.com/snoyberg/keter/master/setup-keter.sh | bash
--2020-08-31 14:48:12--  https://raw.githubusercontent.com/snoyberg/keter/master/setup-keter.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.208.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.208.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1311 (1.3K) [text/plain]
Saving to: ‘STDOUT’

-                   100%[===================>]   1.28K  --.-KB/s    in 0s      

2020-08-31 14:48:12 (91.3 MB/s) - written to stdout [1311/1311]

cp: cannot stat '/root/.local/bin/keter': No such file or directory
@benjamingoldstein
Copy link
Contributor

I also have the exact same issue. When looking at the content of "https://raw.githubusercontent.com/snoyberg/keter/master/setup-keter.sh" it seems that the start of the sh file is like this:

#!/bin/bash
mkdir -p /opt/keter/bin
cp ~/.local/bin/keter /opt/keter/bin

mkdir -p /opt/keter/etc
...

Am I missing some obvious thing, or is the sh script wrong?

@lucch
Copy link
Collaborator

lucch commented Sep 28, 2020

Indeed, it looks like the setup script expects a keter binary to be already available at ~/.local/bin.

I haven't used that script myself, since it is not recommended for production environments, so I would recommend you to build Keter using Stack, and then copy the binary and configuration files to your server.

See this: #200 (comment)

@mmzx
Copy link
Collaborator

mmzx commented Sep 28, 2020

I personally have not used this script to set keter up. It would be helpful if you could verify the existence of the mentioned path in the error message and knowing/checking whether the permissions are sufficient would be necessary also.
BTW, assuming you wish to use keter for Haskell related project: the path ~/.local/bin/keter, could refer to a cabal (legacy) installation folder. - I am not sure whether that is relevant in your case.

@benjamingoldstein
Copy link
Contributor

Thank you @lucch and @mmzx for your responses. The file ~/.local/bin/keter is missing, because I have not installed keter. I made a PR for changing the instructions on the README.md. I will try to install keter with stack. If I get it all working, I will update the instructions further.

@mmzx
Copy link
Collaborator

mmzx commented Sep 29, 2020

stack should work, have you had an issue using a very recent ghc, let us know here. You could also have a look at the CI setup in case resolvers and/or ghc versions are interesting in your case.

@benjamingoldstein
Copy link
Contributor

Thank you @mmzx

I'm on a brand new server.

I just installed stack by copying and pasting the curl install command from the main haskell stack website. It worked.

I just ran stack install keter and it didn't work.

You said to let you know here, if there is some used related to GHC versions, is this error what you mean? (See the later error message below)

$ stack install keter

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for keter-1.4.3.2:
    http-reverse-proxy-0.6.0 from stack configuration does not match >=0.4.2 && <0.5  (latest matching version is 0.4.5)
    unix-compat-0.5.2 from stack configuration does not match >=0.3 && <0.5  (latest matching version is 0.4.3.1)
    yaml-0.11.5.0 from stack configuration does not match >=0.8.4 && <0.9  (latest matching version is 0.8.32)
needed since keter is a build target.

Some different approaches to resolving this:

  * Set 'allow-newer: true' in /home/ubuntu/.stack/config.yaml to ignore all version constraints and build anyway.

  * Recommended action: try adding the following to your extra-deps in /home/ubuntu/.stack/global-project/stack.yaml:

- http-reverse-proxy-0.4.5@sha256:7f2a181ec848e8fdc0bdb4d6e775e488897957ee7ae0a2b82a623360168ccf96,2528
- unix-compat-0.4.3.1@sha256:a291f209e9c9723204c49c978ed2c53997dbc9666e53fe7bf7a3548b2c8bb22c,2030
- yaml-0.8.32@sha256:cb9e788e4c18f3c3579a950c1d53f89efb7e8871f6a00b5fabc37084c05cf04e,5452

Plan construction failed.

I tried to follow the "Recommended action" by pasting those three lines to the end of the file /home/ubuntu/.stack/global-project/stack.yaml but I think I've done it wrong, because it's invalid syntax.

People want instructions that they can just copy and paste, run and get it working.

If I manage to get this working, I will update the instructions on the README.md so that others can just copy paste and get it working.

I tried to edit the config again with a different syntax, just guessing at it. I had to add a line "extra-deps" first, and then some whitespace, and then the suggested lines.

Now I run stack install keter and I get a different message:

$ stack install keter

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for yaml-0.8.32:
    base-4.13.0.0 from stack configuration does not match >=4.9.1 && <4.13  (latest matching version is 4.12.0.0)
needed due to keter-1.4.3.2 -> yaml-0.8.32

Some different approaches to resolving this:

  * Set 'allow-newer: true' in /home/ubuntu/.stack/config.yaml to ignore all version constraints and build anyway.

  * Build requires unattainable version of base. Since base is a part of GHC, you most likely need to use a different GHC version with the matching base.

Plan construction failed.

I am stuck. Sorry for the long message.

Thank you both for your help

@benjamingoldstein
Copy link
Contributor

It sounds risky to do the "Set 'allow-newer: true' ".

But I did it, and the stack install keter now fails with an error in the yaml package, which is the one with the version dependancy issue.

I just tried removing the extra-deps: and just tried with only "Set 'allow-newer: true' ".

Now there is the issue in #170

I give up, I will just try to use nginx instead of keter.

@mmzx
Copy link
Collaborator

mmzx commented Sep 29, 2020

I've no idea about your local setup, but this just works fine if you prefer using stack:
stack build --stack-yaml stack_lts-1319.yaml

@tolysz
Copy link
Contributor

tolysz commented Sep 29, 2020

There is always the #195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants