当我尝试通过raco安装软件包时,我收到一条奇怪的错误消息:
raco setup: directory: #<path:/Users/ben/code/racket/benchmark/tr-pfds/pfds> does not exist for collection: "pfds"
更奇怪的是,正在运行raco pkg show
并未显示有关此“pfds”集合的任何内容:
Installation-wide:
Package Checksum Source
main-distribution f07e2d4bf2708c1085be38eca18aa9eb6755e547 (catalog main-distribution)
racket-lib 41c7b3221006758c5a840a18dcc0d265632f14c2 (catalog racket-lib)
[178 auto-installed packages not shown]
User-specific for installation "6.1":
Package Checksum Source
benchmark 1237b50804bb42bd242ba7b3eb6e2b98794b40ee (catalog benchmark)
feature-profile 109e89701839a6d2fed9d1713aef8d21cc8b54d4 (catalog feature-profile)
quickcheck 1afac87825c5da8b35b327f5df3f1f9e1bf3cb9d (catalog quickcheck)
rackunit-chk 9c6e9c346c0e83bd3bb8dd16e321a2fa3e02b42e (catalog rackunit-chk)
我尝试的另一件事就是删除“pfds”集合,但这也不顺利:
raco6.1 pkg remove pfds
Removing pfds
raco6.1 pkg remove: package not currently installed
package: pfds
current scope: user
但回想起来,这个错误对我来说很有意义,因为我的机器上不存在目录/Users/ben/code/racket/benchmark/tr-pfds/pfds
。几个星期前我删除了它。
有谁知道发生了什么事?
答案 0 :(得分:3)
您过去曾使用过 { name: 'format', items : [ 'Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
{ name: 'tools', items : [ 'Maximize'] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'source', items : [ 'Source'] }
吗?如果您raco link
编辑了自删除后的目录,则有时可以看到此错误消息。
您可以尝试三件事:
运行raco link
。理想情况下,这应该通过删除所有死链接来修复您的安装。
运行raco link --repair
,这应删除您的raco link -r pkfds
链接。
检查您的pfds
文件,该文件位于:
links.rktd
~/.racket/<version>/links.rktd
~/Library/Racket/<version>/links.rktd
在文件中,您可能会看到导致问题的C:\Users\<username>\AppData\Roaming\Racket\<version>\links.rktd
链接。
删除链接后,pfds
应该会再次正常工作。
(作为附录,注意到raco link
has an API call from within Racket可能会很有趣。)