Kafka—源码—0、源码编译

环境

  • gradle: Gradle 6.6.1

wget https://downloads.gradle-dn.com/distributions/gradle-6.6.1-all.zip

  • scala:

Scala code runner version 2.12.11 -- Copyright 2002-2020, LAMP/EPFL and Lightbend, Inc.

java version "1.8.0_241"


安装流程

执行

gradle
./gradlew jar

疑难问题

/usr/bin/env: bash: No such file or directory 解决办法

  • 解决:
    原因在于文件格式保存错误,应该存为unix格式

the problem's cause was that Git on Windows converted the line endings of gradlew from Unix style (LF) to Windows style (CRLF).

You can turn off that automatic conversion using git config core.autocrlf false.
Setting the line endings of gradlew back to Unix style fixed the problem.

In Vim this is done using :set fileformat=unix.


连接报错:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

  • 解决:
    修改hosts
sudo vim /etc/hosts

添加如下内容:

199.232.28.133 raw.githubusercontent.com

参考: https://blog.csdn.net/txl910514/article/details/105880125

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。