1

As soon as I startup the terminal (Ubuntu 12.04 LTS), I get the error message:

bash: export: `/lib/perl5/site_perl/5.14.2/': not a valid identifier

I am not really familiar with Linux yet. How do I rectify this?

EDIT:

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion

fi

export PATH=$PATH/usr/lib/lightdm/lightdm/usr/local/sbin/usr/local/bin/usr/sbin$

export PATH=/usr/lib/lightdm/lightdm/usr/local/sbin/usr/local/bin/usr/sbin/usr/$

export PATH=$PATH:/home/lib-11/Downloads/randfold-2.0/randfold

export PERL5LIB=PERL5LIB:/home/lib-11/Downloads/mirdeep2 /lib/perl5/site_perl/5$

export PATH=$PATH:/home/lib-11/Downloads/mirdeep2

mirdeep2 and randfold are executables that I wanted to run.

  • Hi There! Can you post the output of export | grep "/lib/perl5". – AzkerM Jul 8 '14 at 6:43
  • @AzkerM Yeah I think there is something more serious, it says "Command 'grep' is available in '/bin/grep' The command could not be located because '/bin' is not included in the PATH environment variable. grep: command not found" – The Last Word Jul 8 '14 at 6:45
  • @AzkerM I have to put "export PATH=$PATH:/usr/bin" each time I start the terminal to connect to the bin and permanent solutions dont seem to work – The Last Word Jul 8 '14 at 6:46
  • Can you please edit your question and include the contents of your .bashrc file. – Parto Jul 8 '14 at 6:47
  • @Parto Please check the question. I have edited it – The Last Word Jul 8 '14 at 7:08
2

I guess it is because of the space in the line export PERL5LIB=PERL5LIB:/home/lib-11/Downloads/mirdeep2 /lib/perl5/site_perl/5$ (Notice the space between mirdeep2 and /lib/perl5)

It should be export PERL5LIB=PERL5LIB:/home/lib-11/Downloads/mirdeep2/lib/perl5/site_perl/5$ (Without space)

0

As you've already been told the main issue was the space in the variable's definition. However, your ~/.bashrc file has a few more issues. First of all, it is not the right place to define the PATH or PERL5LIB variables. These should instead be added to ~/.profile or, if the file exists, to ~/.bash_profile.

Also, all of the export lines can be combined into these two:

export "PATH=$PATH:/usr/lib/lightdm:/usr/local/sbin:usr/local/bin:/usr/sbin:/home/lib-11/Downloads/randfold-2.0/randfold:/home/lib-11/Downloads/mirdeep2"

export PERL5LIB="PERL5LIB:/home/lib-11/Downloads/mirdeep2/lib/perl5/site_perl/5"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.