0

I'm sorry to bother you, but I think I've just made a huge mistake. I was trying to install TexLive on my Elementary OS distro. I was following this guide (italian, unfortunately): link

In the chapter 7, there was this sequence of commands

$ echo 'export PATH=/opt/texbin:${PATH}' > texlive.sh $ sudo cp texlive.sh /etc/profile.d/ $ sudo mkdir -p /opt $ sudo ln -s /usr/local/texlive/2012/bin/x86_64-linux /opt/texbin

I'm not so sure, but I think that I've wrongly written also another command: $ sudo rm /opt/texbin (in the guide it's reported some lines later, talking about updating TexLive), and then, as it's writtend, I logged out. But after this, I'm stucked in the login: when I enter my username and password, it gets a black screen for a moment and then it come back to login screen. I've tried to type CTL+ALT+F1, then after my username and password , any command is not executed: it appears an error like "command 'sudo' is available in 'usr/bin/sudo'. The command can't be located because '/usr/bin' is not included in the PATH environment variable.

Does anyone know how to fix this? :(

2

Boot from a live USB or DVD. Then mount the drive (instructions for this abound on the net).

Navigate to your user's home folder:

cd /home/<your username>

Look at the contents of your .bashrc file in your home folder.

Using vi, nano, gedit or similar, edit the line in .bashrc that defines the PATH variable, so that it contains:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Save that. Unmount the drive.

This should allow you to resume normal function after rebooting.

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.