chocolatey doesnt install activeperl package correctly - perl

Using Windows Server 2012 R2, on AWS.
When I install activeperl, chocolatey completes it successfully.
C:\Users\valentin.kragelj>choco install activeperl
Chocolatey v1.2.1
Installing the following packages:
activeperl
By installing, you accept licenses for the packages.
Progress: Downloading ActivePerl 5.28... 100%
ActivePerl v5.28 [Approved]
activeperl package files install completed. Performing other installation steps.
The package ActivePerl 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:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y
Downloading ActivePerl 64 bit
from 'https://cli-msi.s3.amazonaws.com/ActivePerl-5.28.msi'
Progress: 100% - Completed download of C:\Users\valentin.kragelj\AppData\Local\T
emp\2\chocolatey\ActivePerl\5.28\ActivePerl-5.28.msi (5.52 MB).
Download of ActivePerl-5.28.msi (5.52 MB) completed.
Hashes match.
Installing ActivePerl...
ActivePerl has been installed.
activeperl may be able to be automatically uninstalled.
Environment Vars (like PATH) have changed. Close/reopen your shell to
see the changes (or in powershell/cmd.exe just type `refreshenv`).
The install of activeperl was successful.
Software installed as 'msi', install location is likely default.
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
C:\Users\valentin.kragelj>
However when I check C:\ProgramData\chocolatey\bin there is no perl executable, and in C:\Perl64 there is only one file - perl.ico.
I'm firts time chocolatey user. What can I do about activeperl not being properly installed?

Related

How can I install JMX::Jmx4Perl on Windows?

I'm trying to install JMX::Jmx4Perl on ActivePerl on Windows 7. In the CPAN shell, I ran:
install JMX::Jmx4Perl
but I got a message about missing dependencies:
Failed 2/7 test programs. 0/70 subtests failed. ROLAND/jmx4perl-1.12.tar.gz 3 dependencies missing (Sys::SigAction,Term::Size,Term::Clui)
How can I install this?
At least one of the dependencies, Sys::SigAction, isn't supported on Windows. There's a jmx4perl PPM available, but the only versions that build successfully on Windows are several years old.
I think your best shot would be to install Cygwin, which provides a UNIX-like environment on Windows. Even if you manage to install JMX::Jmx4Perl in Cygwin, though, things may not work properly.

How do I remove Python installations with PowerShell Package Management?

I want to write a script which cleans up all existing versions of Python on a machine, and a separate script to re-install both versions 2.7 and 3.5 in standardized locations. I'm currently trying to do this using the Package Management cmdlets in PowerShell 5.1.14393.187.
For the cleanup script, I started with PowerShell's package commands:
Get-Package "*python*" | Uninstall-Package
Which, when run from an admin console, seems to work nicely, but on further investigation leaves some packages remaining...
PS C:\WINDOWS\system32> Get-Package "*python*"
Name Version Source ProviderName
---- ------- ------ ------------
Python 3.5.1 (64-bit) 3.5.1150.0 Programs
Python 3.5.1 pip Bootstrap ... 3.5.1150.0 msi
Python 3.5.1 Tcl/Tk Support... 3.5.1150.0 msi
Python 2.7.11 2.7.11150 msi
Python 3.5.2 pip Bootstrap ... 3.5.2150.0 msi
Python 3.5.2 (32-bit) 3.5.2150.0 Programs
Why are these packages still present after Uninstall-Package? Is there a best-practice way to do this? Is there a best-practice way to script Python's re-installation so this won't happen again?
Update
I've had some success in cleaning up the majority of this by using the control panel GUI to first repair and then uninstall the Python 3 installations. I'm surprised there is no Repair-Package command to go with Get-Package.
Once the other parts of Python 3 were repaired, there was one MSI package called "Python Launcher", and the Python 2.7 MSI package remaining reported by Get-Package, but nothing in the GUI. At this point Uninstall-Package on the "Python Launcher" succeeded with a warning that a reboot was required. No such luck with msi:Python 2.7.11/2.7.11150.
Additional information:
I think Chocolatey v0.10.1 may have contributed to the current situation. At least some of the machines may have had python installed using chocolaty from the public repository. On the same machine above, I've also tried this:
PS C:\WINDOWS\system32> choco uninstall python
Chocolatey v0.10.1
Uninstalling the following packages:
python
python is not installed. Cannot uninstall a non-existent package.
Chocolatey uninstalled 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- python - python is not installed. Cannot uninstall a non-existent package.
Did you know the proceeds of Pro (and some proceeds from other
licensed editions) go into bettering the community infrastructure?
Your support ensures an active community, it makes you look smarter,
plus it nets you some awesome features!
https://chocolatey.org/compare
PS C:\WINDOWS\system32> choco uninstall python3
Chocolatey v0.10.1
Uninstalling the following packages:
python3
python3 v3.5.1
Skipping auto uninstaller - No registry snapshot.
python3 has been successfully uninstalled.
Chocolatey uninstalled 1/1 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\WINDOWS\system32> choco uninstall python2
Chocolatey v0.10.1
Uninstalling the following packages:
python2
python2 v2.7.11
Running auto uninstaller...
Skipping auto uninstaller - The application appears to have been uninstalled already by other means.
python2 has been successfully uninstalled.
Chocolatey uninstalled 1/1 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\WINDOWS\system32> get-package "*python*"
Name Version Source ProviderName
---- ------- ------ ------------
Python 3.5.1 (64-bit) 3.5.1150.0 Programs
Python 3.5.1 pip Bootstrap ... 3.5.1150.0 msi
Python 3.5.1 Tcl/Tk Support... 3.5.1150.0 msi
Python 2.7.11 2.7.11150 msi
Python 3.5.2 pip Bootstrap ... 3.5.2150.0 msi
To answer this question I'm going to highlight a couple of points for you to consider.
Until official support has been announced, don't use the non-official PowerShell PackageManagement provider for Chocolatey. It is an unsupported preview subject to bugs and security flaws (it was also not created by the Chocolatey team). Instead use choco.exe, or another official provider.
AutoUninstaller is the resource in official Chocolatey clients that can remove natively installed software from packages that do not contain an uninstall script. It's important to note that you also need to install from those official clients. More information at https://chocolatey.org/docs/commands-uninstall
Why are these packages still present after uninstall-package?
It really depends on what you used to install the packages and whether Chocolatey was able to capture a snapshot for auto uninstaller.
Many packages do not require an uninstall script. Some do. When they are an MSI and are upgraded outside of Chocolatey (like Chrome does automatically), you either need Package Synchronizer or an uninstall script to uninstall the software.
Is there a best-practice way to do this?
If this is for organizational use, and you have a low tolerance for breakages, we recommend you build your own internal packages. Then you can completely control the process and have a repeatable, reliable process. This is how hundreds of organizations that use Chocolatey currently have enhanced their installation processes. They typically already have software installers already present on some internal file share and build packages around them to take advantage of better automation processes (versus old batch files they may have been using, or worse, manually installing from).
If you are curious on why you should build your own, see https://chocolatey.org/docs/community-packages-disclaimer (it attempts to highlight the issues with a public repository and it being subjected to distribution rights, something an internal repository is not subject to).
Is there a best-practice way to script python's re-installation so this won't happen again?
Use a configuration management tool like Puppet, Chef, Ansible, or DSC with the Chocolatey provider. https://chocolatey.org/docs/features-infrastructure-automation
This is how you create automation across all of your machines and take advantage of package management.

Installing Older Version of Module in Active Perl

I am trying to install the Date::Manip Module in Perl. I am running Perl Version 5.14.2 and it does not seem to be installing successfully through the PPM. (PPM throws a 401 Access required error). I am guessing that the error here is that the Version of Perl is outdated for the module in the ppm. Since this is in the server and there are many other scripts running on a day to day basis, I can not upgrade the Perl version. I need to install the previous version of the Date::Manip module but this is not found in the ppm. How do I go about doing this ?
Thanks !
The reason the 401 error occurs is because you are using ActivePerl 5.14 which is no longer considered as a Community Edition. This means you no longer have access to the PPM server to install modules unless you buy a license from ActiveState.
See here for reference http://community.activestate.com/taxonomy/term/515
You have several options:
You could buy an ActiveState Business Edition License which will give your access to the PPM repository again.
If you have MinGW and dmake installed, you can install this module from CPAN instead. Just enter cpan Date::Manip in the command-line.
Upgrade to the latest version of ActivePerl. (But you'll have the same problem again when this version expires.)
You could install another Perl distribution, like Strawberry Perl.
Try to use the below link and download then install.
https://metacpan.org/pod/Date::Manip

rpm install scripts not executing

I'm working in ClearOS5.3, with rpm 4.4 installed. I'm using rpm to distribute a module I created, however the %post script in my spec file isn't executed when I install the package.
I'm using the command rpmbuild -ba mypackage.spec
to build the rpm, and the command rpm -ivh mypackage-version-release.rpm to install the package.
Installation is performed manually (not using make) in the %install script. All the files seem to be installed in the correct places, however none of the install scripts run (specifically %post and %preun, in the case of my package). Testing with other install scripts (%pre) showed those sections didn't work either.
From what I can tell based on installing the package in debug mode, the %pretrans and %posttrans scripts are run. Additionally, when building the package, it recognizes the the install scripts and lists their dependencies (/bin/sh).
Does anyone have an idea as to why these install scripts might not be running and have suggestions to fix the issue?

Failed to install Tk module of Perl in Windows7

At first,I tried to use ppm and cpanm to install Tk module.But failed to download whth the reason which i don't konw(yet i can install image module) .So I tried another way.I downloaded the Tk-804.030 from the cpan website.And unpacked it.Then I type "perl makefile.pl" in the cmd, howerver, shit happens.There were so many errors.And i remenbered to read the README.txt, so i found the following which make me frustrated.
When you install ActivePerl, it provides patched C runtime as PerlCRT.dll
which it installs in the "system32" directory.
This needs "administrator" rights on NT.
It also provides the import library PerlCRT.lib, but this is installed
in an odd location e.g. C:\ActivePerl\lib\CORE\PerlCRT.lib
where it is not found by MakeMaker or VC++.I copied it to C:\VisualStudio\VC98\lib\PerlCRT.lib
(Your paths may vary dependinh where you installed ActivePerl and VC++.)
I could not find the PerlCRT.dll and PerlCRT.lib in my computer, i googled and found PerlCRT.dll which could be downloaded, but i counld find PerlCRT.lib to download.i don't kown how to do it, i really need some help.It couldn't be better if you can tell me the whole installing procedure. ( I'm new to Perl, and I use Win7, visual studio 2012 and MinGW as well)
See PPM Tk info page, the distro fails to build on the current versions of ActiveState Perl for Windows. You can add the 3rd party Bribes repository, Tk is available there.