In case it shall be made to appear to the court that a lease of the lands of the deceased can be made to raise the money necessary for the payment of the debts of the deceased, and that the leasing thereof will be to the interest of the devisees, legatees, heirs, or distributees, the court may, in its discretion, decree the same to be leased. If a lease of the lands, or any part thereof, be decreed, the executor or administrator shall, upon giving the notice as in like case of sale, lease the same at public outcry or privately, as directed by the decree, to the person who will take the lands for the fewest number of years, not exceeding fifteen, and pay, either in cash or at such time as shall be fixed by the decree, the specific sum to be stated therein, equal to the amount of the debts of the deceased to be paid and the expenses of administration. If the lease be on credit, the lessee shall give security for the payment of the sum, to be approved by the executor or administrator.