无法识别回购命令

问题描述

我使用的是 Linux Mint 20 Cinnamon,但按照安装 repo 的步骤遇到了问题。

我的第一个问题就在这里


class _DatabaseState extends State<Database> {
  List fishList = List();
  getAllFish() async {
    var response =
        await http.get("http://192.168.43.202/maupoisson/getfish.PHP");
    if (response.statusCode == 200) {
      setState(() {
        fishList = json.decode(response.body);
      });
      print(fishList);
      return fishList;
    }
  }

  void initState() {
    super.initState();
    getAllFish();
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),),body: ListView.builder(
            itemCount: fishList.length,itemBuilder: (context,index) {
              return ListTile(
                leading: CircleAvatar(
                  radius: 30.0,/*child: new Image.asset(
                      "assets/images/$fishList[index]['pic_name']"),*/
                  backgroundImage: ExactAssetimage(
                      "assets/images/$fishList[index]['pic_name']"),title: Text(fishList[index]['scientific_name']),subtitle: Text(fishList[index]['species']),onTap: () {
                  Navigator.push(
                      context,new MaterialPageRoute(
                          builder: (context) =>
                              DetailPage(fishList[index]['scientific_name'])));
                },);
            }));
  }
}

我得到的第一个命令:

gpg --recv-key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65
curl https://storage.googleapis.com/git-repo-downloads/repo.asc | gpg --verify - ~/bin/repo

第二个我得到:

gpg: key 16530D5E920F5C65: new key but contains no user ID - skipped
gpg: Total number processed: 1
gpg:           w/o user IDs: 1

如果我跳过这个并尝试直接进入初始化 repo 客户端指令 (https://source.android.com/setup/build/downloading#initializing-a-repo-client),我将使用 repo init 命令:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1256  100  1256    0     0   3245      0 --:--:-- --:--:-- --:--:--  3237
gpg: Signature made Wed 13 Jan 2021 12:12:05 PM EST
gpg:                using DSA key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65
gpg: Can't check signature: No public key
gpg: Signature made Wed 13 Jan 2021 12:12:05 PM EST
gpg:                using RSA key A34A13BE8E76BFF46A0C022DA2E75A824AAB9624
gpg: Can't check signature: No public key
gpg: Signature made Wed 13 Jan 2021 12:12:06 PM EST
gpg:                using EDDSA key E1F9040D7A3F6DAFAC897CD3D3B95DA243E48A39
gpg: Can't check signature: No public key

而且,我收到此错误

repo init -u https://android.googlesource.com/platform/manifes```

更新

运行此命令

/usr/bin/env: ‘python’: No such file or directory

结果显示我确实安装了 python:

ls /usr/bin/python*

解决方法

在其他地方找到了解决方案。根据 Francesco Mantovani 的说法,我需要创建一个“符号链接”。我不确定这是什么,所以如果有人可以对此进行扩展,通过解释它是什么,我会很高兴。

这是解决方案

sudo ln -s /usr/bin/python3.8 /usr/bin/python