[R-SIG-Mac] sh: convert: command not found

Berend Hasselman bhh at xs4all.nl
Fri Oct 31 17:36:06 CET 2014


On 25-10-2014, at 20:25, Kevin Ushey <kevinushey at gmail.com> wrote:

> I've noticed that the PATH is actually duplicated in e.g. R.app (when
> launched from the dock).
> 
>> env <- Sys.getenv()
>> as.list(env[names(env) == "PATH"])
>    $PATH
>    [1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
> 
>    $PATH
>    [1] "/usr/bin:/bin:/usr/sbin:/sbin"
> 
> It is the second of these that `system` sees:
> 
>> system("echo $PATH")
>    /usr/bin:/bin:/usr/sbin:/sbin
> 
> but if we explicitly unset and reset the PATH, we get the (expected?) PATH back:
> 
>> Sys.unsetenv("PATH")
>> Sys.setenv(PATH = "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin")
>> system("echo $PATH")
>    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
> 
> There are a number of other environment variables that are duplicated
> as well, e.g.
> 
>> names(env[duplicated(names(env))])
>    [1] "Apple_PubSub_Socket_Render" "DISPLAY"
> "HOME"
>    [4] "LOGNAME"                    "PATH"
> "SHELL"
>    [7] "SSH_AUTH_SOCK"              "TMPDIR"                     “USER"
> 
> No idea if this is expected or meaningful, but I thought I would post
> this for posterity.
> 

See this discussion of the issue:

http://tex.stackexchange.com/questions/208181/why-did-my-tex-related-gui-program-stop-working-in-mac-os-x-yosemite

Two solutions are offered for the problem: one by Maxwell for C and one by Cheng for C++.


Berend Hasselman



More information about the R-SIG-Mac mailing list