0

I was trying to setup an older version of gcc (4.1) on ubuntu 14.

I was having some difficulties to set alternatives. I so thread where someone said to use this command:

export PATH="/usr/bin:$PATH"

after I ran this, something got messed up because I cannot run update commands

sudo apt-get update 

gives me

sudo: apt-get: command not found

Probably other issue I didn't notice yet but something got broken.

I search for answers, only suggestion I have seen is to re install Ubuntu, but I would to know if there is any fix.

So far I tried to revert this change by running export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games but same result.

1 Answer 1

0

Both paths should have /usr/bin which is where apt-get normally lives in Ubuntu 14.04. You can check where it is in your filesystem: locate apt-get, or you can go there and make sure it is actually where you expect it to be: ls -l /usr/bin/apt*

If that checks out, double check what your path is actually set to: echo $PATH and set it again if somehow /usr/bin was lost from that string.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .