The structure of a polyelectrolyte (PE) around a rigid cylinder is studied by considering the electrostatic and van der Waals interactions between them. The PE is represented by a helix of discrete charges. The cylinder core is allowed to be conducting or dielectric and responds to the external charges electronically. Approximating the cylinder surface locally as a half space, the electrostatic free energy of the PE–cylinder complex is obtained in closed form by solving the Debye–Hückel equation. We show that the competition between the van der Waals adhesion and the electrostatic repulsion between charges can result in an optimal wrapping geometry. The dependence of the optimal geometry on the salt concentration of the solution is demonstrated to be sensitive to the nature of the cylinder. In particular, it is shown that the salt concentration has a strong influence on the optimal geometry for a dielectric cylinder, while it hardly affects that for a conducting cylinder.