1. plink2 doesn't have built-in "variant join" (combining multiple biallelic variants in e.g. haps/sample into a single multiallelic variant when position/REF are identical) yet; you need to use e.g. bcftools to do this for now.
2. --linear is failing for two reasons:
a. Some of your ALT alleles (e.g. #26) don't appear in your dataset at all, after filtering out samples with missing phenotype/covariate values.
b. There are also three linear dependencies that must be removed to get a regression result: ALT #25 and ALT #30 always appear together, the sum of the ALT #11 and #31 columns is equal to the ALT #10 column, and the sum of the ALT #27 and #32 columns is equal to the ALT #21 column. This sort of thing is inevitable when you include a bunch of haplotypes that only appear once.
3. --update-sex, with male=1 and female=2 encoding, is plink's standard way of filling in sex information.