When I run...
perlbrew switch perl-5.16.0
...I get...
A sub-shell is launched with perl-5.16.0 as the activated perl. Run 'exit' to finish it.
...then a bash prompt appears.
Is this expected behavior?
If not, how can I fix it?
That happens when you have an improperly installed perlbrew. As part of the installation, you are instructed to add a command to your shell startup script, but that appears to be missing.
Add the following to your shell startup script:
source .../perlbrew/etc/bashrc
There's a similar script for csh.
source .../perlbrew/etc/cshrc
Related
If I install ImageMagick it works fine, but the next time I start up my terminal the commands aren't being recognised anymore. (command not found: convert)
Am I forgetting to do something crucial after installation? Or could it be the shell I use for my terminal (oh-my-zsh)?
I installed Active Perl 5.20
and also Strawberry Perl 5.20 after uninstalling Active Perl.
In both cases, when I open cmd and type 'perl' I get:
Unknown Unicode option letter ':'.
This error also prevents all scripts from running on my Windows 8.1 installation.
I uninstalled Perl and did a fresh install and it still doesn't work.
Are there dependencies that I need to install?
I googled the error but the results pertain to Linux installations where the script specified something wrong. But I get this error when I even try to use any perl command line or script. So my problem is not a faulty script.
That is the error message you get from using an invalid value for the -C command-line option. At a guess I'd say you have the PERL_UNICODE environment variable set to a string that contains a colon :.
Take a look at Command Switches in perldoc perlrun for more detail on this.
I too had this problem on windows 8.1 . The problem is that, once on installation, .pl files are not automatically recognized by Perl engine. So please select a .pl file and right click and say open with and set the default program to C\perl\bin\ inside it click perl.exe and recognize it. Once this is done your perl works flawlessly.
Now I have a question for the mac os. I activated the unattended mode for the installer and tried out this on a win system. There it works fine. Now I wanted to start the installer on a mac os but didn't get it run correctly. I tried the following command:
open MyApp.app --args -q -console -varfile my.varfile
This starts always the GUI installation instead the unattended mode. Maybe the terminal command is incorrect?
Kind regards
Hardie
"/bin/open" is not suitable for command line-style invocations, since the passing of arguments is not synchronous and they are not passed to the main method. Instead, call the executable directly:
MyApp.app/Contents/MacOS/JavaApplicationStub -q -varfile my.varfile
Btw: "-console" is not applicable for Mac OS X, only for Windows.
I have a custom Makefile project in Eclipse and although the build does get run in a Cygwin shell... it does not seem to be a login shell (bash --login) as it doesn't set my environment variables like running cygwin.bat does.
Where in Eclipse can I change the shell command so that it will be a login shell?
What you actually aim with bash --login are your settings from /etc/profile.
Under UNIX you normally have only one login shell and so these settings are inherited by all other shells. Under Windows any Bash window is an isoloated login shell, which leads to missing environment settings when running Bash from tools that run bash simply as command processor.
I had a similar problem with Emacs compile feature. The best solution under Windows is to set the environment variable BASH_ENV to a script. Bash will execute this script when started without -i or --login, so that /etc/profile is not run. Hence the script will setup Bash for non-interactive, non-login shells.
Example:
BASH_ENV=%USERPROFILE%\.bash_env
as user environment variable. The least thing to do in this script is to set PATH as in /etc/profile:
PATH="/usr/local/bin:/usr/bin:${PATH}"
Check the path-settings in /etc/profile as it is created by Cygwin's setup.exe. You may also copy settings from ~/.bashrc or source this script.
Hope this helps.
I installed perlbrew on Linux backtrack on my virtual machine. and I have perl 5.10.1 installed on my backtrack. but when I write perlbrew command in the terminal it shows the following message:
perlbrew: command not found
What is wrong with my system?
When you installed perlbrew, you were instructed to add something like
source ~/perl5/perlbrew/etc/bashrc
to your shell startup script (.bashrc). It appears that you did not do this, or that you did not restart your shell after doing this.
The standard sudo apt install perlbrew on a fresh Ubuntu18 install appears to be borken (and Ubuntu20 too if my memory isn't malfunctioning). And has been so for some time. I couldn't get it to work even if I appended source ~/perl5/perlbrew/etc/bashrc to ~/.bash_profile and/or ~/.bashrc and started a new bash. And also did perlbrew init.
What eventually worked for me is curl -L https://install.perlbrew.pl | bash taken from https://perlbrew.pl/ After this which perlbrew shows the correct /home/me/perl5/perlbrew/bin/perlbrew instead of /usr/bin/perlbrew. And now I can see the whole list of available perl5 versions with perlbrew available.