Strawberry Perl v5.30.0无法安装Tcl(Windows 10) [英] Strawberry Perl v5.30.0 not able to install Tcl (Windows 10)

查看:447
本文介绍了Strawberry Perl v5.30.0无法安装Tcl(Windows 10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Windows上的 strawberryperl.com 下载并安装了Strawberry-perl-5.30.0.1-64bit.msi. 10,并尝试使用cpan安装Tcl模块,但由于缺少tclsh而失败.可能是什么问题?

I downloaded and installed strawberry-perl-5.30.0.1-64bit.msi from strawberryperl.com on my Windows 10 and tried to install Tcl module using cpan, but it fails for missing tclsh. What could be the problem?

C:\Strawberry>cpan Tcl
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.217)
Database was generated on Thu, 24 Oct 2019 12:40:15 GMT
Running install for module 'Tcl'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.086)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\V\VK\VKON\Tcl-1.27.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.32)
CPAN: YAML::XS loaded ok (v0.78)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20190522)
Configuring V/VK/VKON/Tcl-1.27.tar.gz with Makefile.PL
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created  VKON/Tcl-1.27.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.

C:\Strawberry>dir C:\Strawberry\cpan\build\Tcl-1.27-0
 Volume in drive C is OSDisk
 Volume Serial Number is BCC0-703E

 Directory of C:\Strawberry\cpan\build\Tcl-1.27-0

25.10.2019  13.05    <DIR>          .
25.10.2019  13.05    <DIR>          ..
14.07.2018  11.00             5 207 Changes
22.08.2018  11.21            10 139 Makefile.PL
22.08.2018  11.45             1 723 MANIFEST
22.08.2018  11.45             1 140 META.json
22.08.2018  11.44               617 META.yml
14.07.2018  20.26             1 246 README
25.10.2019  13.05    <DIR>          t
25.10.2019  13.05    <DIR>          tcl-core
22.08.2018  11.43            43 540 Tcl.pm
22.08.2018  10.57            46 049 Tcl.xs
16.06.2018  15.18               439 tclcfg.tcl
16.06.2018  15.18                48 typemap
              10 File(s)        110 148 bytes
               4 Dir(s)  316 953 681 920 bytes free

推荐答案

您可以通过从> https://visualstudio.microsoft.com/vs/

You can build the missing dependency tclsh by downloading the source distribution from https://prdownloads.sourceforge.net/tcl/tcl8420-src.zip. To compile the source you need a C compiler. I tried the community edition of visual studio: https://visualstudio.microsoft.com/vs/

  • 单击下载社区版本.

  • Click download community edition..

然后选择要安装的内容

然后单击安装"

安装后,进入菜单工具->命令行->开发人员命令提示符"并运行

After installation, go to menu "Tools->Command Line->Developer Command Prompt" and run

nmake -f makefile.vc

从提取的Tcl源分发的win子文件夹中(在我的计算机上,它位于C:\Users\Bruker\tcl\tcl8.4.20\win)

from the win sub folder of the extracted Tcl source distribution (on my computer it was located at C:\Users\Bruker\tcl\tcl8.4.20\win)

上面的nmake命令创建一个带有可执行文件tclsh84.exe的新文件夹Release_VC13.请注意,可执行文件的名称不是tclsh.exe.

The the above nmake command creates a new folder Release_VC13 with an executable file tclsh84.exe. Note that the name of the executable is not tclsh.exe.

现在将可执行文件的文件夹添加到系统PATH环境变量中: C:\Users\Bruker\tcl\tcl8.4.20\win\Release_VC13,然后关闭命令提示符,然后再次重新打开以刷新路径设置.

Now add the folder of the executable to the system PATH environment variable: C:\Users\Bruker\tcl\tcl8.4.20\win\Release_VC13, then close the command prompt and reopen again to refresh the path settings.

尝试键入tclsh84,您应该得到带有前导%提示符的tcl shell命令提示符.然后键入exit退出tcl shell.

Try type tclsh84, and you should get a tcl shell command prompt with a leading % prompt. Then type exit to exit the tcl shell.

下一个问题是使用Strawberry Perl安装Tcl模块.首先尝试运行:

The next problem is to install the Tcl module using Strawberry perl. Trying first to run:

> cpan Tcl
[...]
'tclsh' is not recognized as an internal or external command,
operable program or batch file.
error starting tclsh: $?=256; $!=
No 'Makefile' created  VKON/Tcl-1.27.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Tcl'.

问题在于可执行文件不是tclsh,而是tclsh84(请参见上文).

The problem is that the executable is not called tclsh but tclsh84 (see above).

我接下来要做的是下载Tcl模块的源代码发行版:

The next thing I did was to download the source distribution for the Tcl module:

> cpan -g Tcl

然后解压缩下载的文件Tcl-1.27.tar.gz并更改到源分发目录.通过检查Makefile.PL,我发现Makefile.PL接受了一个命令行参数--tclsh,该参数给出了tcl shell命令的名称.所以我尝试了:

Then extracted the downloaded file Tcl-1.27.tar.gz and changed to the source distribution directory. By inspecting the Makefile.PL I found that the Makefile.PL took a command line argument --tclsh that gave the name of the tcl shell command. So I tried:

> perl Makefile.PL --tclsh=tclsh84

,现在效果很好.然后,我尝试使用gmake(Strawberry Perl发行版随附)进行编译:

and this worked fine now. Then I tried to compile with gmake (which comes with the Strawberry Perl distribution):

> gmake

这也可以,但是运行gmake test失败,并且还安装和测试了该模块:

This also worked, but running gmake test failed, and also installing and testing the module:

> gmake install  
> perl -MTcl -e1
failed dlopen(C:/Users/Bruker/tcl/tcl8.4.20/win/Release_VC13/tcl84.dll,...);
failed dlopen(./tcl84.dll,...);
failed dlopen(tcl84.dll,...);
trying dlopen(tcl89.dll,...)
trying dlopen(tcl88.dll,...)
trying dlopen(tcl87.dll,...)
trying dlopen(tcl86.dll,...)
trying dlopen(tcl85.dll,...)
trying dlopen(tcl84.dll,...)
trying dlopen(tcl83.dll,...)
trying dlopen(tcl82.dll,...)
trying dlopen(tcl81.dll,...)
trying dlopen(tcl80.dll,...)
failed all posible tcl vers 8.x from 9 down to 0 at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Failed to load Tcl dll! at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Unable to initialize Tcl at C:/Strawberry/perl/lib/XSLoader.pm line 111.
Compilation failed in require.
BEGIN failed--compilation aborted.

我计划稍后再解决此问题,并进行进一步调查.

I plan to come back to this problem later and investigate further.

这篇关于Strawberry Perl v5.30.0无法安装Tcl(Windows 10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆