Stata: Ado package not found
Asked Answered
P

1

5

I am looking to install the user-written 'esttab' of stata package 'st0085_2.pkg'. Normally I would type the following to do this:

net install st0085_2.pkg

In this case it outputs:

checking st0085_2 consistency and verifying not already installed...
    installing into c:\ado\plus\...
    file c:\ado\plus\next.trk already exists
    r(602)

So I changed the ado directory path and install the ado to somewhere else (I cant delete next.trk without admin approval):

net set ado "U:\Documents\Stata\AMIE\ado"
net install st0085_2.pkg

The installation is successful but still the esttab command is unrecognized and I try and find where the ado is and it outputs that it has not yet been installed.

I don't see how STATA can say the ado-file already exists when downloading but when retrieving the package is not found? unless they are looking in different directories but even when I ado set a new path (I have tried many combinations) it still cannot find the package.

This is extra frustrating as I have used esttab on other computers.

Picaroon answered 7/4, 2017 at 21:45 Comment(2)
A wild guess is that something crashed and you need to clean up some debris. It's often hard to diagnose precisely what over the net without lots of questions. I'd go straight to StataCorp technical support. I don't think you lose very much if you delete the trk file, but Technical Support would give authoritative advice.Respect
You should use the operating system to tell you about all instances of the key files and tell us also what your adopath is. Telling us that you can't find something does not let us tell you where it is.Respect
M
8

While I doubt the original poster is still around, the answer may be interesting to others encountering the same situation.

The problem OP encounters here is that he does not have the correct rights to modify/delete the next.trk file in the default ado folder. Usually this happens when you do not have admin rights on a (heavily) locked-down server.

One solution is to copy the files directly: however, this can be rather tricky if the server is really locked down, or you have programs with unspecified dependencies.

The alternative is to change your ado folder. OP took the correct first step by altering the location of net install through net set ado "somefoldername". However, they missed the second step, which tells Stata "somefoldername" is part of the adopath.

This is done through adopath ++ "somefoldername". If I'm not mistaken, this only stays active as long as Stata is open. To make this "permanent", that line of code should be added to the profile.do dofile, which runs automatically at Stata startup. See the Stata FAQ for more information on the profile.do file.

Malcolm answered 12/2, 2018 at 14:45 Comment(4)
Helpful. Some minor confusion between do files and ado files in the last para that I'll let you fix. I've seen several variations on this error report and they're necessarily almost always very hard to diagnose: typically you get told little or nothing about the OP's Stata installation history or computer set-up. I recommend caution here as for example installation "by hand" can confuse Stata's record of what is installed.Respect
At the time of writing the OP is listed as "Last seen Jul 29 '17 at 18:44" so not still around is a good guess.Respect
To be frank, I have no idea where I got that directory from. You can definitely put it there though. "Stata looks for profile.do first in the directory where Stata is installed, then in the current directory, then along your path, then in your home directory [...] and finally along the ado-path."Malcolm
And now awarded.Respect

© 2022 - 2024 — McMap. All rights reserved.