On 12/20/2009 01:31 PM, peter kint wrote:
Graphical? Type in terminal:
sudo nautilus
Go to the /usr/local , Create folder and name it texlive
Then do right click on the created and
Properties> Permission and change Owner and Group by your user name.
I wouldn't recommend this. Stuff in the /usr/local/ hierarchy isn't
MEANT to be writeable by normal users. If you want to install just for
yourself, then install to some directory under $HOME/.
rh
OK. Then how do I force the install program to another directory? Can I use any
directory name? Will Lyx find it there? I'm getting a bit confused here.
I've lost track of what we're trying to install, but I take it that you
were trying to install some updated version of tex-live? I wouldn't
recommend that, either, unless (a) you know what you are doing or (b)
you can install it via the Ubuntu package manager.
If I remember right, the issue was just installing a LaTeX package, not
upgrading the whole LaTeX installation. So my suggestion would be to
forget about upgrading TeX itself and just to install the package. I've
just done this myself and so have found out what at least one of the
problems is.
Here are the steps to follow.
1. Download CircuiTikz to /tmp:
[rgh...@rghquad ~]$ cd /tmp
[rgh...@rghquad tmp]$ wget
http://home.dei.polimi.it/mredaelli/downloads/circuitikz.zip
2. Make sure it is there:
[rgh...@rghquad tmp]$ ls circuitikz.zip
circuitikz.zip
3. We now want to figure out where to put this thing. So run "locate
/latex.ltx" as a way of finding out where your base TeX
installation is. I see:
[rgh...@rghquad tmp]$ locate /latex.ltx
/usr/share/texmf/tex/latex/base/latex.ltx
This tells me that my main TeX tree is at /usr/share/texmf/. Yours
may be elsewhere. We want the part before "tex/latex/...".
NOTE: Please see below. This is by far not the best way for us to
proceed, but it will at least work.
4. If you see more than one such file, then I think you still have
multiple TeX installations, which is going to confuse everything.
Get rid of one of them.
5. Go to your local TeX tree:
[rgh...@rghquad tmp]$ cd /usr/share/texmf
6. Now, per the directions here:
http://home.dei.polimi.it/mredaelli/circuitikz/download.html
we are going to unpack the distribution file in our texmf
directory---though not the local one, since we are trying to keep
this simple. We have to do this as root. So:
[rgh...@rghquad texmf]$ sudo unzip /tmp/circuitikz.zip
[sudo] password for rgheck:
Archive: /tmp/circuitikz.zip
creating: doc/latex/circuitikz/
creating: tex/latex/circuitikz/
inflating: doc/latex/circuitikz/README
inflating: doc/latex/circuitikz/CHANGELOG~
inflating: doc/latex/circuitikz/circuitikzmanual.pdf
inflating: doc/latex/circuitikz/CHANGELOG
inflating: doc/latex/circuitikz/circuitikzmanual.tex
inflating: tex/latex/circuitikz/pgfcirctripoles.sty
inflating: tex/latex/circuitikz/pgfcircquadpoles.sty
inflating: tex/latex/circuitikz/circuitikz.sty
inflating: tex/latex/circuitikz/pgfcircvoltage.sty
inflating: tex/latex/circuitikz/pgfcircshapes.sty
inflating: tex/latex/circuitikz/pgfcircmonopoles.sty
inflating: tex/latex/circuitikz/pgfcircmath.sty
inflating: tex/latex/circuitikz/pgfcirclabel.sty
inflating: tex/latex/circuitikz/pgfcirccurrent.sty
inflating: tex/latex/circuitikz/pgfcircbipoles.sty
inflating: tex/latex/circuitikz/pgfcircutils.sty
7. There's a permission problem in the archive that we need to fix.
You can see it here:
[rgh...@rghquad texmf]$ ls -l tex/latex/circuitikz/
total 160
-rwx------ 1 root root 28768 2009-05-20 11:26 circuitikz.sty
...
The main circuitikz.sty file is not readable by normal users! So:
[rgh...@rghquad texmf]$ sudo chmod 644
tex/latex/circuitikz/circuitikz.sty
8. Update the TeX databases:
[rgh...@rghquad texmf]$ sudo texhash
texhash: Updating /etc/texmf/ls-R...
texhash: Updating /usr/share/texmf/ls-R...
texhash: Updating /var/lib/texmf/ls-R...
texhash: Done.
9. Check the results:
[rgh...@rghquad texmf]$ kpsewhich circuitikz.sty
/usr/share/texmf/tex/latex/circuitikz/circuitikz.sty
The permissions problem may also have been part of the issue before.
I've written the developer about it.
Now, regarding the note above, it isn't really a good idea for us to
install our package into the main TeX tree. The reason is that an
upgrade of TeX could overwrite all of this, and then we'd lose the
package. This is why TeX provides several different trees where we can
put our files. There are usually three of these, and their locations are
(almost always) defined in the file texmf.cnf. Let's look at it:
[rgh...@rghquad texmf]$ less `locate texmf.cnf`
If you go down a bit, you'll find something like this:
% Part 1: Search paths and directories.
% You can set an environment variable to override TEXMF if you're testing
% a new TeX tree, without changing anything else.
%
% You may wish to use one of the $SELFAUTO... variables here so TeX will
% find where to look dynamically. See the manual and the definition
% below of TEXMFCNF.
% The tree containing the runtime files closely related to the specific
% program version used:
TEXMFMAIN = /usr/share/texmf
% The main distribution tree:
TEXMFDIST = /usr/share/texmf
% A place for local additions to a "standard" texmf tree.
% This tree is not used for local configuration maintained by
% texconfig, it uses TEXMFCONFIG below.
TEXMFLOCAL = /usr/local/share/texmf
TEXMFDIST and TEXMFLOCAL are the ones of interest. These are, as it
says, the "main" tree and teh "local" tree. The latter is where
system-wide additions should really be put.
A bit further down we find:
% User texmf trees are allowed as follows.
% This used to be HOMETEXMF.
TEXMFHOME = $HOME/texmf
This is the user tree, which individual users (like you) can put their
own additions.
Your directories may differ. But, whatever they are, we should really
put circuitikz in TEXMFLOCAL or TEXMFHOME.
For the "local" tree, create it if necessary, then get to work:
[rgh...@rghquad texmf]$ sudo mkdir -p /usr/local/share/texmf
[rgh...@rghquad texmf]$ cd /usr/local/share/texmf
[rgh...@rghquad texmf]$ sudo unzip /tmp/circuitikz.zip
Proceed as above.
For the home tree, same deal, but we don't need sudo, since these are
our directories:
[rgh...@rghquad texmf]$ mkdir /home/rgheck/texmf
[rgh...@rghquad texmf]$ cd /home/rgheck/texmf
[rgh...@rghquad texmf]$ unzip /tmp/circuitikz.zip
Proceed as above, again.
Richard