snapframework / snap-core

Core type definitions (Snap monad, HTTP types, etc) and utilities for web handlers.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
317 stars 85 forks source link

I can't get snap to run #188

Closed Lynchnco closed 10 years ago

Lynchnco commented 10 years ago

I'm running an iMac with OS X 10.6.8 and an old version of GHC - version 7.0.4 I ran the command: snap --version the following error msg appeared: -bash: snap: command not found

I tried updating my GHC but am unable to do so - could be caused by my not having OS X 10.7 or 10.8.

I ran into similar problem while trying to install Yesod.

I'd appreciate any guidance.

ChristopherBiscardi commented 10 years ago

It looks like the location that cabal has installed snap to isn't on your path.

Are you using a sandbox or are you installing on the base system?

For example, my global executables are installed in ~/Library/Haskell/bin. This is also the location my cabal config file: ~/.cabal/config tells me.

gregorycollins commented 10 years ago

Either there or ~/.cabal/bin

On Tue, Mar 4, 2014 at 6:54 PM, Christopher Biscardi < notifications@github.com> wrote:

It looks like the location that cabal has installed snap to isn't on your path.

Are you using a sandbox or are you installing on the base system?

For example, my global executables are installed in ~/Library/Haskell/bin. This is also the location my cabal config file: ~/.cabal/config tells me.

— Reply to this email directly or view it on GitHubhttps://github.com/snapframework/snap-core/issues/188#issuecomment-36705287 .

Gregory Collins greg@gregorycollins.net

Lynchnco commented 10 years ago

Good morning,

...my ~/.cabal/bin shows:
config config.platform ...my ~/Library/Haskell/bin doesn't show anything for snap

...I changed to my root and then to my $HOME directories and ran the following command at both places: find . -name "snap" -print ...snap was not found.

...So, it looks like snap was not installed on my system or I am not using the proper command to find it since many files report "...protected".

PS ...I was trying this with yesod and ran into the following problems [note: I have old versions of cabal, GHC and OS X]:

  1. I couldn't update to the latest version of cabal - I reported this as a 'bug' and received help in getting the updated version.
  2. I couldn't update GHC using "http://www.haskell.org/platform/mac.html - see next line for screen print" - the download requires that the iMac be at version OS X 10.8. I'm in the process of updating this. Note: this says for OS X 10.6. Download the Mac OS X installer here:

Haskell Platform 2013.2.0.0 for Mac OS X, 32 bit (10.6 or later) SHA-1: 15dd8762c9800308cb7cfdd16ea1a8e74988e06a

Haskell Platform 2013.2.0.0 for Mac OS X, 64 bit (10.6 or later) SHA-1: 89e6fb747816af69acabc5c04cee103257855614

 3. yesod update has a dependency on GHC and it couldn't be updated till I get GHC updated. 

...I checked both the directory and file [~/Library/Haskell/bin {this is in my PATH}, ~/.cabal/config] to see if I could find snap - I couldn't.

...wish me luck

Good day

On Mar 5, 2014, at 12:55 AM, Gregory Collins wrote:

Either there or ~/.cabal/bin

On Tue, Mar 4, 2014 at 6:54 PM, Christopher Biscardi < notifications@github.com> wrote:

It looks like the location that cabal has installed snap to isn't on your path.

Are you using a sandbox or are you installing on the base system?

For example, my global executables are installed in ~/Library/Haskell/bin. This is also the location my cabal config file: ~/.cabal/config tells me.

— Reply to this email directly or view it on GitHubhttps://github.com/snapframework/snap-core/issues/188#issuecomment-36705287 .

Gregory Collins greg@gregorycollins.net — Reply to this email directly or view it on GitHub.

Lynchnco commented 10 years ago

Good morning Gregory and

...I ran the following command in my $HOME:

  find . -name "snap" -print

...it returned nothing.

...I'm either using the wrong command or not searching at the right point - I tried this at my root but it returned a lot of "...permissions denied".

Good day

On Mar 5, 2014, at 12:55 AM, Gregory Collins wrote:

Either there or ~/.cabal/bin

On Tue, Mar 4, 2014 at 6:54 PM, Christopher Biscardi < notifications@github.com> wrote:

It looks like the location that cabal has installed snap to isn't on your path.

Are you using a sandbox or are you installing on the base system?

For example, my global executables are installed in ~/Library/Haskell/bin. This is also the location my cabal config file: ~/.cabal/config tells me.

— Reply to this email directly or view it on GitHubhttps://github.com/snapframework/snap-core/issues/188#issuecomment-36705287 .

Gregory Collins greg@gregorycollins.net — Reply to this email directly or view it on GitHub.

gregorycollins commented 10 years ago

Passing "--verbose=3" to "cabal install" should cause it to dump the binary location.

gregorycollins commented 10 years ago

Also executable dir should be specified in "~/.cabal/config"

Lynchnco commented 10 years ago

Good morning,

...my "~/.cabal/config" doesn't contain an executable dir. ...this is what I did:

ls -a .cabal . .. config config.platform

...I'm in the process of upgrading to OS X 10.8. ...Hopefully, this will make things a bit easier. ...I'm having similar problems with yesod.

Good day

On Mar 5, 2014, at 11:02 AM, Gregory Collins wrote:

Also executable dir should be specified in "~/.cabal/config"

— Reply to this email directly or view it on GitHub.

Lynchnco commented 10 years ago

Good morning, ...I ran: cabal install snap --verbose=3 ...I noted a number of "rejecting:..." in the output - only one shown at the bottom, many more are in the output but not shown in the list below.

Searching for ghc in path. Found ghc at /usr/bin/ghc ("/usr/bin/ghc",["--numeric-version"]) /usr/bin/ghc is version 7.0.4 looking for tool ghc-pkg near compiler in /usr/bin found ghc-pkg in /usr/bin/ghc-pkg ("/usr/bin/ghc-pkg",["--version"]) /usr/bin/ghc-pkg is version 7.0.4 ("/usr/bin/ghc",["--supported-languages"]) ("/usr/bin/ghc",["--info"]) Reading installed packages... ("/usr/bin/ghc-pkg",["dump","--global","-v0"]) ("/usr/bin/ghc-pkg",["dump","--user","-v0"]) ("/usr/bin/ghc",["--print-libdir"]) Reading available packages... Choosing modular solver. Resolving dependencies... [0] trying: snap-0.13.2.2 (user goal) [1] trying: base-4.3.1.0/installed-239... (dependency of snap-0.13.2.2) [2] trying: rts-1.0/installedbuil... (dependency of base-4.3.1.0/installed-239...) [3] trying: ffi-1.0/installedbuil... (dependency of rts-1.0/installedbuil...) [4] trying: integer-gmp-0.2.0.3/installed-298... (dependency of base-4.3.1.0/installed-239...) [5] trying: ghc-prim-0.2.0.0/installed-d9d... (dependency of base-4.3.1.0/installed-239...) [6] rejecting: snap-0.13.2.2:-old-base (conflict: base==4.3.1.0/installed-239..., snap-0.13.2.2:old-base => base>=4.4 && <5) [6] trying: snap-0.13.2.2:+old-base [7] trying: template-haskell-2.5.0.0/installed-b46... (dependency of snap-0.13.2.2) [8] trying: pretty-1.0.1.2/installed-f8d... (dependency of template-haskell-2.5.0.0/installed-b46...) [__9] trying: old-time-1.0.0.6/installed-7f1... (dependency of snap-0.13.2.2) [_10] trying: old-locale-1.0.0.2/installed-161... (dependency of old-time-1.0.0.6/installed-7f1...) [_11] next goal: lens (dependency of snap-0.13.2.2:+old-base) [_11] rejecting: lens-4.0.4, 4.0.3, 4.0.2, 4.0.1, 4.0, 3.10.2, 3.10.1, 3.10.0.1, 3.10, 3.9.2, 3.9.1, 3.9.0.3, 3.9.0.2, 3.9.0.1, 3.9, 3.8.7.3, 3.8.7

On Mar 5, 2014, at 11:01 AM, Gregory Collins wrote:

--verbose=3

gregorycollins commented 10 years ago

my "~/.cabal/config" doesn't contain an executable dir.

It's a configuration file.

Lynchnco commented 10 years ago

I updated my iMac to 10.9.2, this allowed me to update cabal to 1.18.1.2, finally I was now able to update GHC to 7.6.3.

However, I still can't get an answer to snap --version. It returns command snap not found.

Do you think installing snap again would help?

Lynchnco commented 10 years ago

I tried to load snap again.

I get the following errors:

136 warnings and 6 errors generated. Failed to install vector-0.10.9.1 cabal: Error: some packages failed to install: aeson-0.7.0.1 depends on vector-0.10.9.1 which failed to install. clientsession-0.9.0.3 depends on vector-0.10.9.1 which failed to install. cprng-aes-0.5.2 depends on vector-0.10.9.1 which failed to install. crypto-random-0.0.7 depends on vector-0.10.9.1 which failed to install. heist-0.13.0.6 depends on vector-0.10.9.1 which failed to install. lens-4.0.5 depends on vector-0.10.9.1 which failed to install. mwc-random-0.13.1.1 depends on vector-0.10.9.1 which failed to install. snap-0.13.2.2 depends on vector-0.10.9.1 which failed to install. snap-core-0.9.6.0 depends on vector-0.10.9.1 which failed to install. snap-server-0.9.4.0 depends on vector-0.10.9.1 which failed to install. vector-0.10.9.1 failed during the building phase. The exception was: ExitFailure 1 vector-algorithms-0.6.0.1 depends on vector-0.10.9.1 which failed to install.

I tried to run snap --version It returns: -bash: snap: command not found

So, either I have a path problem or snap was not installed.

Ps - I think I have the same problem with yesod, bummer.

...any suggestions pat

mightybyte commented 10 years ago

See https://github.com/snapframework/snap/issues/106#issuecomment-36822852

Lynchnco commented 10 years ago

Good morning mighty byte, ...my environment: iMac Mavericks - version 10.9.2 cabal - version 1.18.0.2 GHC - version 7.6.3 ...using "snapframework/snap#106 (comment)" as a reference, I ran:

cabal install snap-0.13.0 cabal install ...got the following messages: 136 warnings and 6 errors generated. Failed to install vector-0.10.9.1 cabal: Error: some packages failed to install: aeson-0.7.0.1 depends on vector-0.10.9.1 which failed to install. clientsession-0.9.0.3 depends on vector-0.10.9.1 which failed to install. cprng-aes-0.5.2 depends on vector-0.10.9.1 which failed to install. crypto-random-0.0.7 depends on vector-0.10.9.1 which failed to install. heist-0.13.0.6 depends on vector-0.10.9.1 which failed to install. lens-4.0.5 depends on vector-0.10.9.1 which failed to install. mwc-random-0.13.1.1 depends on vector-0.10.9.1 which failed to install. snap-0.13.2.2 depends on vector-0.10.9.1 which failed to install. snap-core-0.9.6.0 depends on vector-0.10.9.1 which failed to install. snap-server-0.9.4.0 depends on vector-0.10.9.1 which failed to install. vector-0.10.9.1 failed during the building phase. The exception was: ExitFailure 1 vector-algorithms-0.6.0.1 depends on vector-0.10.9.1 which failed to install.

patricknchsimac:~ patricklynch$ snap -bash: snap: command not found

mightybyte commented 10 years ago

Did you follow the instructions here?

http://www.haskell.org/haskellwiki/Mac_OS_X#Mac_OS_X_10.9_.28Mavericks.29.2C_Mac_OS_X_10.8_.28Mountain_Lion.29_and_Xcode_5

Also, this SO question.

http://stackoverflow.com/questions/19579577/installing-building-ghc-with-osx-mavericks-ghc

Lynchnco commented 10 years ago

Hi, …sorry for not responding sooner - but I had to buy circus tickets for my 12 grandchildren and run my “honey-do list”.

…the link I used to download GHC was: http://www.haskell.org/platform/mac.html It is different from “instructions" link that you mentioned in your email below. It does not call for an installation of Xcode.

…as for the SO question mentioned in your email: I updated my iMac to Mavericks and installed GHC 7.6.3, everything seems to be running fine - that is, ghci and ghc seem to work just fine. so I don’t seem to have the problem reported in the SO question.

…as for the “instructions” link mentioned in your email: I have my path set to what is recommended in it. I never will use HUGS, so I’ve ignored this one. Since I used the link http://www.haskell.org/platform/mac.html for my download of GHC, I did not check for Xcode 3.2 and I did not install Xcode 4.1 or Xcode 5. So, as a lark, I checked for Xcode 3.2 and couldn’t find anything for Xcode by using the commands find and grep. Therefore, I’m assuming that I don’t have it on my iMac [this may not be a good assumption - since the instructions do not state where Xcode is located]. So, I’m assuming either Xcode 4.1 or Xcode 5 has not been installed. Question: should I install Xcode and if so should I use Xcode 4.1 or Xcode 5?

…I will take a look at the GHC User’s Guide, if I can get all of this installed.

Have a good day

On Mar 6, 2014, at 11:15 AM, Doug Beardsley notifications@github.com wrote:

Did you follow the instructions here?

http://www.haskell.org/haskellwiki/Mac_OS_X#Mac_OS_X_10.9_.28Mavericks.29.2C_Mac_OS_X_10.8_.28Mountain_Lion.29_and_Xcode_5

Also, this SO question.

http://stackoverflow.com/questions/19579577/installing-building-ghc-with-osx-mavericks-ghc

— Reply to this email directly or view it on GitHub.

mightybyte commented 10 years ago

Hmmm, I can't really say more without more details. The cabal-install output you pasted only tells me that vector failed to install, not what the actual error message was. I think you'll have better luck solving this problem if you go to somewhere like the #haskell or #snapframework IRC channels where you can get much more interactive help.

Lynchnco commented 10 years ago

Good evening,

…well, I’ve finally given up on trying to download Snap. …also, I couldn’t download yesod or hackage either.

…however, hackage has an online service that doesn’t need a download - see link: http://happstack.com/docs/crashcourse/index.html …there is also a “School of Haskell” - see link https: //www.fpcomplete.com …these two work together, …hopefully, working with them will provide me with a development environment that will allow me to see if four apps that I would like to implement are feasible. …I know that I could implement them with ASP.Net or RoR.

…if you ever hear of someone who would like to run a system test on any of this, please let me know - I would do it pro bono. …I have many years experience with system testing. …I really wish that cabal would give a final message indicating the download or install of cabal was successful or failed. …If successful, it would be wonderful if it listed where it was implemented - something like: cabal was successfully installed in /usr/something/bin/cabal. …Just a thought, but it sure would of made my life easier - all in all, I’ve spent about a week on this. ... bummer, it really shouldn’t be this hard. …sorry for being a newbie.

…first time in 40 years when I couldn’t get a system installed. …hopefully, the Hackage online environment will keep me busy for a while.

Thanks for all your help Patrick

mightybyte commented 10 years ago

I'm sorry you're having trouble. I'm more than willing to help you debug this problem, but it needs to be in a more interactive environment like IRC where the feedback loop is much shorter. We're using all of these things every day successfully in production, so there must be something about your setup that is different somehow. But we need a higher bandwidth communication channel to effectively figure out what it is.

Lynchnco commented 10 years ago

Good morning, ...thank you for your kind offer. ...I will join IRC, below is some attributes that it is asking me to select - are there any that you would recommend:

 Add Server __________
      Descriptiong ________
      IRC Server    ________
      Port             ________
      Group          ________

I'd appreciate any assistance.

Thanks again and have a good week, Patrick ----- Original Message ----- From: Doug Beardsley To: snapframework/snap-core Cc: Lynchnco Sent: Saturday, March 08, 2014 2:21 PM Subject: Re: [snap-core] I can't get snap to run (#188)

I'm sorry you're having trouble. I'm more than willing to help you debug this problem, but it needs to be in a more interactive environment like IRC where the feedback loop is much shorter. We're using all of these things every day successfully in production, so there must be something about your setup that is different somehow. But we need a higher bandwidth communication channel to effectively figure out what it is.

- Reply to this email directly or view it on GitHub.

Lynchnco commented 10 years ago

Good morning, ...sorry about the delay in responding. ...looks like I've been closed out on GitHub. ...I've never used IRC - can you tell me how to sign up for it? Good week, Patrick ----- Original Message ----- From: Doug Beardsley To: snapframework/snap-core Cc: Lynchnco Sent: Saturday, March 08, 2014 2:21 PM Subject: Re: [snap-core] I can't get snap to run (#188)

I'm sorry you're having trouble. I'm more than willing to help you debug this problem, but it needs to be in a more interactive environment like IRC where the feedback loop is much shorter. We're using all of these things every day successfully in production, so there must be something about your setup that is different somehow. But we need a higher bandwidth communication channel to effectively figure out what it is.

- Reply to this email directly or view it on GitHub.