chevdor / ethereum-chocolatey

Chocolatey package to install the C++ Ethereum client: AlethZero
GNU General Public License v2.0
2 stars 7 forks source link

Bad numeric constant: 7. At C:\ProgramData\chocolatey\lib\AlethZero-Stable\tools\chocolateyInstall.ps1:1 #7

Open marimes opened 9 years ago

marimes commented 9 years ago

Hi Ethereum Team,

Below is the output of the failed installation attempt. It is the second time I ran this so 7zip was already installed successfully. Any hint as to what I can do next is much appreciated.

Cheers, Marius

C:>cinst -pre -force alethzero-stable Chocolatey v0.9.9.6 Installing the following packages: alethzero-stable By installing you accept licenses for the packages.

AlethZero-Stable v0.8.2.3-POC8 (forced) The package AlethZero-Stable wants to run 'chocolateyInstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider setting 'allowGlobalConfirmation'. Run 'choco feature -h' for more details. Do you want to run the script? 1) yes 2) no 3) print 1 Bad numeric constant: 7. At C:\ProgramData\chocolatey\lib\AlethZero-Stable\tools\chocolateyInstall.ps1:1 3 char:2

Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures:

chevdor commented 9 years ago

Hi Marius This issue is yet unknown to me. Thanks for reporting it. I will look into it and update you. A bit busy those days so it may take a bit.

chevdor commented 9 years ago

I did not publish the following package yet as the previous version does work for me so I can´t say if this new version does fix the issue.

Could you test the package attached here and let me know if that helps?

AlethZero-Stable.0.8.2.55.nupkg | uploaded via ZenHub

Once downloaded, go into that folder and run the following command: cinst -source . AlethZero-Stable -force -y (notice the -y to avoid getting those confirmation all the time)

marimes commented 9 years ago

I extracted nupkg into C:\Users\marius\Documents\tmp and get the following:

C:\Users\marius\Documents\tmp>cinst -source . AlethZero-Stable -force -y Chocolatey v0.9.9.6 Installing the following packages: AlethZero-Stable By installing you accept licenses for the packages. AlethZero-Stable not installed. The package was not found with the source(s) listed. If you specified a particular version and are receiving this message, it is possible that the package name exists but the version does not. Version: "" Source(s): "."

Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures:

C:\Users\marius\Documents\tmp>clist -s . Chocolatey v0.9.9.6 0 packages found.

marimes commented 9 years ago

OK, now I have found out how to use choco, I didn't know that the source qualifier needs to point to a directory with the nupkg file rather than to a directory with the extracted content. Now it starts the installation but the error remains.

C:\Users\marius\Downloads>cinst -source . AlethZero-Stable -force -y Chocolatey v0.9.9.6 Installing the following packages: AlethZero-Stable By installing you accept licenses for the packages.

AlethZero-Stable v0.8.2.55 (forced) Bad numeric constant: 7. At C:\ProgramData\chocolatey\lib\AlethZero-Stable\tools\chocolateyInstall.ps1:1 3 char:2

Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures:

chevdor commented 9 years ago

OK that makes me sense now and i see the last issue remains. I will have to dig into that.

chevdor commented 9 years ago

Hello, Can you try that one ?

AlethZero-Stable.0.8.2.56.nupkg | uploaded via ZenHub

marimes commented 9 years ago

Hi Chevdor,

here we go....

C:\Users\marius\Downloads>cinst -source . AlethZero-Stable -force -y Chocolatey v0.9.9.6 Installing the following packages: AlethZero-Stable By installing you accept licenses for the packages.

AlethZero-Stable v0.8.2.56 (forced) The string starting: At C:\ProgramData\chocolatey\lib\AlethZero-Stable\tools\chocolateyInstall.ps1:2 0 char:36

Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures:

C:\Users\marius\Downloads>

Best, Marius

chevdor commented 9 years ago

Boy, that will be hard. From what I gathered, the issue only occurs with the old versions of powershell so I don´t reproduce the issue. I will try finding a box but I guess I have only newer versions. If you don´t mind, this is also something you could experiment on your end. You can write a simple script using 7za (even calling the help should do) and try to make it to run, that could help.

marimes commented 9 years ago

What worked for me is defining 7z as an alias and then use the alias to launch:

set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
sz a Test.7z Test.ps1

chevdor commented 9 years ago

Hi Marius, Thanks for your help. I implemented a similar solution to avoid your issue. Can you give another shot to the attached package please. It is also using an alias but pointing to the 7za utility installed by the dependency mentioned in the package.

AlethZero-Stable.0.8.2.57.nupkg | uploaded via ZenHub

By the way, to make it easier, you could also upgrade your powershell, however, I am happy you ran in this issue and reported it so we can make it work also in this case.

marimes commented 9 years ago

Happy to run these test but, then again, I shall be even happier with AlethZero up and running ;-)

PowerShell still complains (FYI, I run cinst as Administrator):

C:\Users\marius\Downloads>cinst -source . AlethZero-Stable -force -y Chocolatey v0.9.9.6 Installing the following packages: AlethZero-Stable By installing you accept licenses for the packages.

AlethZero-Stable v0.8.2.57 (forced) The string starting: At C:\ProgramData\chocolatey\lib\AlethZero-Stable\tools\chocolateyInstall.ps1:2 2 char:36

Chocolatey installed 0/1 package(s). 1 package(s) failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures:

C:\Users\marius\Downloads>

chevdor commented 9 years ago

Well that it an easy one. You seem to have a good machine for the testing: you get them all!

Would not that be easier if you would test the install script directly and submit a merge request?

I will get you a new version anyway. Hopefully it will be the last one ;)

chevdor commented 9 years ago

Hello, Were you able to do some more testing on your side? New candidate attached. Let me know.

AlethZero-Stable.0.8.2.58.nupkg | uploaded via ZenHub

marimes commented 9 years ago

Hi,

I am still getting errors but will look into it now. I have not used PowerShell or Chocolatey before which is why I did not initially think of working on the script myself - will have a go now...

chevdor commented 9 years ago

I think it would be more efficient indeed. I am glad to help you get started. This is not very complicated. You can find the unzipped package in program data. Then you run/edit the chocoInstall.ps1 script.

On Thu, Jun 4, 2015, 07:11 Marius Messerli notifications@github.com wrote:

Hi,

I am still getting errors but will look into it now. I have not used PowerShell or Chocolatey before which is why I did not initially think of working on the script myself - will have a go now...

— Reply to this email directly or view it on GitHub https://github.com/chevdor/ethereum-chocolatey/issues/7#issuecomment-108726951 .

marimes commented 9 years ago

When I add lines one by one and execute the script it first fails with the Cmdlet Inove-WebRequest which does not exist in my version (2) of powershell. I found http://stackoverflow.com/questions/25120703/invoke-webrequest-equivalent-in-powershell-v2 but don't know enough about powershell to apply. Does this make sense?

chevdor commented 9 years ago

OK so that´s a totally different problem and I fear we wont go far this way. Does not it make more sense to update your powershell instead?

What would be required here is to check the powershell version and run an alternate function for this Invoke_WebRequest. I`ll be honnest with you, I have limited motivation to support old stuff.

Also, I am surprised to see you running into so many issues. If I remember right, you are running Windows 7, me too. The package has been written/tested on Windows 7. I don´t have my machine near by right now to check the powershell version. It is possible that I upgraded powershell on it.

If your knowledge about powershell is limited, the easiest is to upgrade to the latest version and enjoy the script as it is. If you are motivated to learn, this could be a good exercice though and your pull request is very welcome.

marimes commented 9 years ago

Ethereum is a front-running technology and I wouln't worry too much about a kind of off-center Windows 7 installation. The only reason I was using this box is its GPU to see how it would perform during mining. I could install geth and am downloading the blockchain. However, I'd still like to get AlethZero running. My interest is to see how I could run www.mindliner.com on Ethereum to offer new functions.

Marius Messerli, Ph.D. Founder and Lead Activist Mindliner AG Mobile: +41 79 402 5404 Office: +41 52 551 0057 http://www.mindliner.com Am 04.06.2015 17:02:24 schrieb Chevdor notifications@github.com: OK so that´s a totally different problem and I fear we wont go far this way. Does not it make more sense to update your powershell instead?

What would be required here is to check the powershell version and run an alternate function for this Invoke_WebRequest. I`ll be honnest with you, I have limited motivation to support old stuff.

Also, I am surprised to see you running into so many issues. If I remember right, you are running Windows 7, me too. The package has been written/tested on Windows 7. I don´t have my machine near by right now to check the powershell version. It is possible that I upgraded powershell on it.

If your knowledge about powershell is limited, the easiest is to upgrade to the latest version and enjoy the script as it is. If you are motivated to learn, this could be a good exercice though and your pull request is very welcome.


Reply to this email directly or view it on GitHub: https://github.com/chevdor/ethereum-chocolatey/issues/7#issuecomment-108926153

alberthendriks commented 9 years ago

I had the same problem and it was solved by upgrading things: http://forum.ethereum.org/discussion/2176/alethzero-building-error?

step21 commented 9 years ago

Regarding the original problem - you have to update to powershell 4, that solves it.