我正在尝试运行 gpsfeed+ 来测试我正在编写的应用程序,并且在运行 gpsfeed+ 时.tcl,我收到一条信息,
Error in startup script: can't find package udp
while executing
"package req udp"
(file "gpsfeed+.tcl" line 738)
似乎没有可用于下载和安装 udp 包的说明/帮助..
有谁有直接的方法将此包添加到 tcl 吗?
(我使用的是 osx 10.6.7,并且在 /opt/local/lib/tcl8.5/ 中安装了 tcl8.5)
谢谢,
EDIT: Solution (Thanks, Donal)
- 我下载了 ActiveTcl,并安装它(双击)。
- ActiveTcl安装
teacup
,应该更新:sudo teacup update-self
-
sudo teacup install udp
找到并安装了udp包
<块引用>
正在解析 udp ... [package udp 1.0.9 macosx10.5-i386-x86_64 @ http://teapot .activestate.com]
正在解析 Tcl 8.4 -is package ... [package Tcl 8.5.9 _ ... 安装在存储库外部,探测依赖项]
正在检索包 udp 1.0.9 macosx10.5-i386-x86_64 ...@ http://teapot.activestate.com ... 好的
安装到 /Library/Tcl/teapot
安装包 udp 1.0.9 macosx10.5-i386-x86_64
-
现在,要么更改 ActiveTcl tclsh 版本的路径,要么显式运行它
/usr/local/bin/tclsh8.5 gpsfeed+.tcl
工作,并且找到 udp 库。
现在,我所需要的只是有人将其重写以使其清晰易读! ;)
I'm trying to run gpsfeed+ to test an app I'm writing, and when running gpsfeed+.tcl, I get a
Error in startup script: can't find package udp
while executing
"package req udp"
(file "gpsfeed+.tcl" line 738)
There seem to be no instructions/help available for downloading and installing the udp package..
Does anyone have a straight-forward method for adding this package to tcl?
(I'm on osx 10.6.7, and have tcl8.5 installed in /opt/local/lib/tcl8.5/)
Thanks
EDIT: Solution (Thanks, Donal)
- I downloaded ActiveTcl, and installed it (Double-click).
- ActiveTcl installs
teacup
, which should be updated: sudo teacup update-self
-
sudo teacup install udp
found and installed the udp package
Resolving udp ... [package udp 1.0.9 macosx10.5-i386-x86_64 @ http://teapot.activestate.com]
Resolving Tcl 8.4 -is package ... [package Tcl 8.5.9 _ ... Installed outside repository, probing dependencies]
Retrieving package udp 1.0.9 macosx10.5-i386-x86_64 ...@ http://teapot.activestate.com ... Ok
Installing into /Library/Tcl/teapot
Installing package udp 1.0.9 macosx10.5-i386-x86_64
-
Now, either changing the path for the ActiveTcl tclsh version, or running it explicitly
/usr/local/bin/tclsh8.5 gpsfeed+.tcl
works, and the udp library is found.
Now, all I need is someone to rewrite it to be legible! ;)
发布评论
评论(1)
我在 OSX 上使用 ActiveTcl 。虽然我不记得
udp
包是否是默认下载的一部分,或者您是否必须在安装后使用teacup update
来拉取它,但我知道 ActiveState 大多数当然要分发该包以与他们的发行版一起使用。如果您直接构建,TclUDP Wiki 页面 指向获取源代码的位置以及如何使用它(如果您需要的话)。安装包的目录需要位于
auto_path
全局变量中的位置列表中。从 Tcl 安装路径中已列出的位置中选择安装位置,或者lappend
将 TclUDP 放置在脚本开头的位置。 gpsfeed+ 代码可能有一些代码允许您指定包安装位置而无需编辑其代码,但我不知道,所以如果没有更多的研究,我无法确定。I use ActiveTcl on OSX. While I can't remember if the
udp
package is part of the default download or if you have to useteacup update
to pull it in after installation, I know that ActiveState most certainly distribute the package for use with their distribution.If you're building directly, the TclUDP Wiki page points to where to get the source code from as well as how to use it (if you need that). The directory where you install the package needs to be on the list of places in the
auto_path
global variable. Either pick the installation location from a place already listed on that path in your installation of Tcl, orlappend
the location where you put TclUDP at the start of the script. Thegpsfeed+
code might have some code to allow you to specify package installation locations without editing its code, but I don't know it so I can't say for sure without quite a bit more research.