We study some typical defect problems in one-dimensional (1D) hexagonal and two-dimensional (2D) octagonal quasicrystals. The first part of this investigation addresses in detail a uniformly moving screw dislocation in a 1D hexagonal piezoelectric quasicrystal with point group 6mm. A general solution is derived in terms of two functions φ1, φ2, which satisfy wave equations, and another harmonic function φ3. Elementary expressions for the phonon and phason displacements, strains, stresses, electric potential, electric fields and electric displacements induced by the moving screw dislocation are then arrived at by employing the obtained general solution. The derived solution is verified by comparison with existing solutions. Also obtained in this part of the investigation is the total energy of the moving screw dislocation. The second part of this investigation is devoted to the study of the interaction of a straight dislocation with a semi-infinite crack in an octagonal quasicrystal. Here the crack penetrates through the solid along the period direction and the dislocation line is parallel to the period direction. We first derive a general solution in terms of four analytic functions for plane strain problem in octagonal quasicrystals by means of differential operator theory and the complex variable method. All the phonon and phason displacements and stresses can be expressed in terms of the four analytic functions. Then we derive the exact solution for a straight dislocation near a semi-infinite crack in an octagonal quasicrystal, and also present the phonon and phason stress intensity factors induced by the straight dislocation and remote loads.