Usually Mathematica under Linux is installed as root. Therefore normal users do not have wite permission to /usr/local/Wolfram/Mathematica/9.0/AddOns/
. This is why you see that message you mentioned.
While in principle you could do something like chown -R eden:eden /usr/local/Wolfram
, this is neither encouraged nor advisable.
Instead, as mentioned in the documentation of Mathematca, you put user-packages into the Applications
or Autoload
directory inside either $UserBaseDirectory
or $BaseDirectory
.
However all you really need to do is to put a package somewhere in a directory which is on $Path
. I.e. just like MemberQ[$Path, FileNameJoin[{$UserBaseDirectory, "Applications"}]]
gives True
, so should MemberQ[$Path,"/opt/mpackdir"]
, which you can easily achieve by something like If[!MemberQ[$Path, "/opt/mydir"],AppendTo[$Path,"/opt/mydir"]
.
So all is really easy and clear.
In[1]:= $UserBaseDirectory Out[1]= /home/rolfm/.Mathematica
Please read the documentation $\endgroup$