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 08 '14 at 06: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 08 '14 at 06: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 08 '14 at 06:46
  • Can you please edit your question and include the contents of your .bashrc file. – Parto Jul 08 '14 at 06:47
  • @Parto Please check the question. I have edited it – The Last Word Jul 08 '14 at 07:08

2 Answers2

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)

Camicri
  • 1,390
  • That fixed it thanks. But can you please advice me on why I have to put export PATH=$PATH:/usr/bin each time I start up – The Last Word Jul 08 '14 at 07:16
  • You might try to check answers in this : http://askubuntu.com/questions/814/how-to-run-scripts-on-start-up , there are lot of ways to do it, just choose what is working for your script. – Camicri Jul 08 '14 at 07:21
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"
terdon
  • 100,812