Compiling and Installing TiDB
- Obtain the TiDB source package.
1 2 3 4
cd /home/ git clone https://github.com.cnpmjs.org/pingcap/tidb.git cd tidb/ git checkout v3.0.13
- Compile and install TiDB.
- Edit the go.mod file and comment out line 17. The resource address is in line 18.
1vi go.mod
- Edit the go.mod file. Because golang.org/x/text cannot access the resource, add the following content to line 77:
1replace golang.org/x/text => github.com/golang/text v0.3.0

- Perform the compilation.
1gmake

- Edit the go.mod file and comment out line 17. The resource address is in line 18.
Parent topic: Compilation and Installation