在FreeBSD、Windows、Ubuntu24三种平台下安装Racket

devtools/2025/1/11 22:27:03/

Racket 简介

Racket 是一种多范式编程语言,源自 Scheme 语言,主要用于教学、研究和软件开发。它具有以下几个显著特点:

  • 多范式支持:Racket 支持函数式编程、命令式编程和面向对象编程,允许开发者根据需求选择合适的编程风格。

  • 强大的宏系统:Racket 提供了强大的宏系统,允许开发者创建新的语言和语法扩展,使得编写 DSL(领域特定语言)变得更加容易。

  • 丰富的库和工具:Racket 拥有丰富的标准库和第三方库,支持图形界面、网络编程、数据库访问等多种功能。

  • 教学友好:Racket 被广泛用于计算机科学教育,特别是在编程语言和计算机科学基础课程中。它的设计旨在帮助学生理解编程的基本概念。

  • 跨平台支持:Racket 可以在多种操作系统上运行,包括 Windows、macOS 和 Linux。

FreeBSD下安装racket

先查找一下FrreeBSD下的Racket包:

pkg search racket
racket-minimal-8.11.1_1        Interactive, integrated, graphical Scheme programming environment

安装

sudo pkg install racket-minimal

安装完成!

但是 raco pkg install sha 报错,没装成。

Windows下安装Racket

到网站下载软件

官网下载:Download Racket

清华源下载:Racket: Index 

下载后,直接双击打开,报安全信息不让执行。

到power shell里去执行:

E:\360Downloads> .\racket-8.15-x86_64-win32-cs.exe

 后面就是windows下的安装步骤,一步步确定即可。

安装好后,点图标运行racket

运行DrRacket,安装sha包,这个是成功的

Resolving "sha" via https://download.racket-lang.org/releases/8.15/catalog/
Resolving "sha" via https://pkgs.racket-lang.org
Downloading repository github://github.com/greghendershott/sha/master commit f9472bea67e05e8c11dc915e943038d3a7276a9b
raco setup: version: 8.15
raco setup: platform: win32\x86_64 [cs]
raco setup: target machine: ta6nt
raco setup: installation name: 8.15
raco setup: variants: cs
raco setup: main collects: E:\Program Files\Racket\collects\
raco setup: collects paths: 
raco setup:   C:\Users\Admin\AppData\Roaming\Racket\8.15\collects
raco setup:   E:\Program Files\Racket\collects\
raco setup: main pkgs: E:\Program Files\Racket\share\pkgs
raco setup: pkgs paths: 
raco setup:   E:\Program Files\Racket\share\pkgs
raco setup:   C:\Users\Admin\AppData\Roaming\Racket\8.15\pkgs
raco setup: links files: 
raco setup:   E:\Program Files\Racket\share\links.rktd
raco setup:   C:\Users\Admin\AppData\Roaming\Racket\8.15\links.rktd
raco setup: main docs: E:\Program Files\Racket\doc
raco setup: --- updating info-domain tables ---                    [10:22:17]
raco setup: updating: C:\Users\Admin\AppData\Roaming\Racket\8.15\share\info-cache.rktd
raco setup: --- pre-installing collections ---                     [10:22:17]
raco setup: --- installing foreign libraries ---                   [10:22:17]
raco setup: --- installing shared files ---                        [10:22:17]
raco setup: --- compiling collections ---                          [10:22:17]
raco setup: --- parallel build using 8 jobs ---                    [10:22:17]
raco setup: 7 making: <pkgs>/sha/sha
raco setup: --- creating launchers ---                             [10:22:21]
raco setup: --- building documentation ---                         [10:22:21]
raco setup: 6 running: <pkgs>/racket-index/scribblings/main/user/local-redirect.scrbl
raco setup: 7 running: <pkgs>/racket-index/scribblings/main/user/release.scrbl
raco setup: 4 running: <pkgs>/sha/sha/sha.scrbl
raco setup: 0 running: <pkgs>/racket-index/scribblings/main/user/search.scrbl
raco setup: 3 running: <pkgs>/racket-index/scribblings/main/user/start.scrbl
raco setup: 4 rendering: <pkgs>/racket-index/scribblings/main/user/local-redirect.scrbl
raco setup: 3 rendering: <pkgs>/racket-index/scribblings/main/user/release.scrbl
raco setup: 2 rendering: <pkgs>/racket-index/scribblings/main/user/search.scrbl
raco setup: 1 rendering: <pkgs>/sha/sha/sha.scrbl
raco setup: 0 rendering: <pkgs>/racket-index/scribblings/main/user/start.scrbl
raco setup: --- installing collections ---                         [10:22:41]
raco setup: --- post-installing collections ---                    [10:22:41]

但是不知道该怎么在命令行使用....比如怎么执行Arc.sh ? 

Ubuntu24.04下安装最新版

为了安装最新版,就不用apt install 安装了,而是直接从官网下载。当然可以从清华源下载:

Racket: Index

下载racket-8.15-x86_64-linux-cs.sh 

执行安装,安装成功!

 

Target Directories:[e] Executables      /home/skywalk/bin (will be created)[o] Libraries        /home/skywalk/lib/racket (will be created)[s] Shared files     /home/skywalk/share/racket (will be created)[c] Configuration    /home/skywalk/etc/racket (will be created)[d] Documentation    /home/skywalk/share/racket/doc (will be created)[a] .desktop files   /home/skywalk/share/applications (will be created)[m] Man Pages        /home/skywalk/share/man (will be created)[l] C Libraries      /home/skywalk/lib (will be created)[h] C headers        /home/skywalk/include/racket (will be created)[z] Compiled at lib? yes
Enter a letter to change an entry, or enter to continue.
>Checking the integrity of the binary archive... ok.
Unpacking into "/home/skywalk/racket-tmp-install" (Ctrl+C to abort)...
Done.
Moving bin -> /home/skywalk/bin
Moving collects -> /home/skywalk/share/racket/collects
Moving share/pkgs -> /home/skywalk/share/racket/pkgs
Moving doc -> /home/skywalk/share/racket/doc
Moving lib -> /home/skywalk/lib/racket
Moving include -> /home/skywalk/include/racket
Moving share/applications -> /home/skywalk/share/applications
Moving share -> /home/skywalk/share/racket
Moving etc -> /home/skywalk/etc/racket
Moving man -> /home/skywalk/share/man
Moving README -> /home/skywalk/share/racket/doc/README
Writing uninstaller at: /home/skywalk/bin/racket-uninstall...
Rewriting configuration file at: /home/skywalk/etc/racket/config.rktd...
Moving "compiled" in /home/skywalk/share/racket/collects to /home/skywalk/lib/racket/compiled/home/skywalk/share/racket/collects
Moving "compiled" in /home/skywalk/share/racket/pkgs to /home/skywalk/lib/racket/compiled/home/skywalk/share/racket/pkgs
Rewriting configuration file at: /home/skywalk/etc/racket/config.rktd...Installation complete.

但是用raco 测试了一下,还是识别是8.10版本....

raco pkg install sha

重开了一个终端,又执行raco setup

然后执行

raco pkg install sha

这回能看到是8.15版本了。

但还是报错:  system error: Connection reset by peer; errno=104

 raco pkg install sha
Resolving "sha" via https://download.racket-lang.org/releases/8.15/catalog/
Resolving "sha" via https://pkgs.racket-lang.org
error reading from stream portsystem error: Connection reset by peer; errno=104context...:/home/skywalk/share/racket/collects/openssl/mzssl.rkt:950:0: pump-input-once/home/skywalk/share/racket/collects/openssl/mzssl.rkt:1413:0: wrap-ports/home/skywalk/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3/home/skywalk/share/racket/collects/net/http-client.rkt:67:0: http-conn-open!/home/skywalk/share/racket/collects/net/http-client.rkt:274:0: http-conn-open/home/skywalk/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3/home/skywalk/share/racket/collects/net/url.rkt:201:0: http://getpost-impure-port/home/skywalk/share/racket/collects/net/url.rkt:304:0: get-pure-port/headers/home/skywalk/share/racket/collects/racket/contract/private/arrow-val-first.rkt:555:3/home/skywalk/share/racket/collects/pkg/private/network.rkt:59:3/home/skywalk/share/racket/collects/pkg/private/catalog.rkt:218:0: read-from-server/home/skywalk/share/racket/collects/pkg/private/catalog.rkt:135:2: lookup-normally/home/skywalk/share/racket/collects/pkg/private/prefetch.rkt:129:4/home/skywalk/share/racket/collects/pkg/private/prefetch.rkt:128:2/home/skywalk/share/racket/collects/pkg/private/catalog.rkt:132:0: package-catalog-lookup/home/skywalk/share/racket/collects/pkg/private/catalog.rkt:200:0: package-catalog-lookup-source

暂时就先到这里吧。


http://www.ppmy.cn/devtools/149709.html

相关文章

【CSS】设置滚动条样式

文章目录 基本语法用法案例 基本语法 在CSS中&#xff0c;可以使用 ::-webkit-scrollbar 和相关伪元素来为滚动条设置样式&#xff0c;但请注意这些伪元素是非标准的&#xff0c;主要用于WebKit内核浏览器&#xff08;如Chrome、Safari&#xff09;。 ::-webkit-scrollbar CSS …

针对数据库系统安全的漏洞扫描加固工具【WebSocket + MySQL】

一、系统背景 随着信息技术的迅猛发展和互联网的普及&#xff0c;数据库作为存储、管理和检索大量数据的关键组件&#xff0c;其安全性对于企业和组织来说至关重要。然而&#xff0c;由于网络环境的复杂性和攻击手段的多样性&#xff0c;数据库面临着越来越多的安全威胁&#…

NLP三大特征抽取器:CNN、RNN与Transformer全面解析

引言 自然语言处理&#xff08;NLP&#xff09;领域的快速发展离不开深度学习技术的推动。随着应用需求的不断增加&#xff0c;如何高效地从文本中抽取特征成为NLP研究中的核心问题。深度学习中三大主要特征抽取器——卷积神经网络&#xff08;Convolutional Neural Network, …

WebSocket介绍与使用

1.简介 在我们平时写的web项目中&#xff0c;大多是使用http协议&#xff0c;但是http协议是典型的一问一答的模式&#xff0c;只能由客户端向服务器发送请求&#xff0c;再由服务器返回响应&#xff0c;但实际开发中&#xff0c;很多场景都需要服务器主动发送消息给服务端&am…

C#Halcon找线封装

利用CreateMetrologyModel封装找线工具时&#xff0c;在后期实际应用调试时容易把检测极性搞混乱&#xff0c;造成检测偏差&#xff0c;基于此&#xff0c;此Demo增加画线后检测极性的指引&#xff0c;首先看一下效果 加载测试图片 画线 确定后指引效果 找线效果 修改显示 UI代…

探索Java爬虫:获取淘宝App商品详情原数据API接口的实现

在当今的互联网时代&#xff0c;数据是最宝贵的资源之一。对于电商平台而言&#xff0c;商品详情数据更是重中之重。本文将带你深入了解如何使用Java爬虫获取淘宝App商品详情的原数据API接口&#xff0c;帮助你掌握这一技术&#xff0c;提升数据获取能力。 一、为什么选择Java…

深入理解 JSON 数据传递方式:数组格式与对象包装格式的对比与选择

深入理解 JSON 数据传递方式&#xff1a;数组格式与对象包装格式的对比与选择 深入理解 JSON 数据传递方式&#xff1a;数组格式与对象包装格式的对比与选择一、JSON 数组格式与对象包装格式的概述1. JSON 数组格式2. JSON 对象包装格式 二、数组格式与对象包装格式的主要区别1…

有收到腾讯委托律师事务所向AppStore投诉带有【水印相机】主标题名称App的开发者吗

近期&#xff0c;有多名开发者反馈&#xff0c;收到来自腾讯科技 (深圳) 有限公司委托北京的一家**诚律师事务所卞&#xff0c;写给AppStore的投诉邮件。 邮件内容主要说的是&#xff0c;腾讯注册了【水印相机】这四个字的商标&#xff0c;所以你们这些在AppStore上的app&…