1

A friend helped me install Racket 6.1 on my Ubuntu a long time ago. He did something with make I don't know and now I have a Racket folder in my home directory.

Recently I'd like to upgrade Racket to 6.5, so I added Racket ppa to apt-get and then upgrade successfully. However, as I type racket into terminal, it's still version 6.1. Drracket is still 6.1, too.

Setting up racket-common (6.5-20160429~trusty) ...
Installing new version of config file /etc/racket/config.rktd ...
Setting up racket (6.5-20160429~trusty) ...
xxx@laptop:~$ racket --version
Welcome to Racket v6.1.

I opened the /etc/racket/config.rktd, it prescribes racket directory as /usr/share/applications. When I opened /usr/share/applications, there's an icon of DrRacket and clicking on it's 6.1.

What can I do now?

Thank you,

UPDATE:
This is before I move the racket folder to Trash

chi@laptop:~$ racket --version
Welcome to Racket v6.1.

chi@laptop:~$ which racket
/home/chi/racket/bin/racket

chi@laptop:~$ echo $PATH
/home/chi/racket/bin:/home/chi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

This is after I move it to Trash

chi@laptop:~$ racket --version
bash: /home/chi/racket/bin/racket: No such file or directory

chi@laptop:~$ which racket
/usr/bin/racket

chi@laptop:~$ echo $PATH
/home/chi/racket/bin:/home/chi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

If I restore the racket folder from Trash, it's like before. Any suggestions?

Thank you,

Danibix
  • 2,097

1 Answers1

1

Let's focus on the command-line invocation first. My guess is that your PATH includes the path of the old installation (the one in your home directory) first. Or perhaps it's just a question of doing a rehash. Here's what I'd suggest:

  • Open a new terminal window (one way to make sure that paths are refreshed).
  • run racket --version, make sure that it's still 6.1.
  • run which racket to see which version of racket you're running. I'm guessing it'll be one installed in your home directory.
  • run echo $PATH to see what your PATH looks like. My guess is that the path to the one installed in your home directory will occur before the one installed using the ppa.

If everything I've supposed is true, then you can probably solve this by deleting the racket directory in your home directory (or, more conservatively, by moving it to /tmp so you can get it back if you want).

After removing the racket from your home directory you need to tell your shell (bash), that the command has disappeared from previous location, because bash shell remembers location of commands already used. You can remove this command hash table either by running: hash -r or just closing existing shell instances and opening new terminal window.

oerdnj
  • 7,940