Date: 201810
Local time of day: 1801-2400
Location: ZZZ.Tower, US
Flight conditions: VMC
Aircraft: EMB ERJ 140 ER/LR
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Takeoff / Launch
Airspace: Class B ZZZ
ATC / advisory: Tower ZZZ
Aircraft component: Landing Gear
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Second reporter function: Pilot Not Flying; First Officer
Anomaly: Aircraft Equipment Problem Less Severe
Detector: Person Flight Crew
When detected: In-flight
Result: Flight Crew Landed As Precaution; Flight Crew Returned To Departure Airport; General Maintenance Action
Contributing factors: Aircraft
Primary problem: Aircraft

Narrative: After a normal taxi and initial takeoff; I called for 'gear up.' The First Officer (FO) reported that the gear handle would not come up. We were still in the traffic pattern. I decided that the safest course of action would be to land immediately.[We] requested an immediate return to land. They gave us right traffic and cleared us for the visual. I called for flaps up; the after takeoff checklist and a heading; since the FO had a better view of the runway in a right turn. He set the heading bug and brought the flaps up. We heard the aural 'takeoff flaps' and he informed me that the engines would not leave the ALT T/O-1 mode. The thrust levers were NOT in the takeoff thrust detent and the engine temperatures were normal.We leveled off at 2;500 feet; talked to the flight attendant; and made a PA. I had the FO dial in the localizer and look up the speeds. We were just under max landing weight. We configured and were stabilized by 1;000 feet and landed softly within the touchdown zone. The IC 1-2 WOW INOP and LG AIR/GND FAIL caution messages came up as I tried to deploy the reversers; which were unresponsive. We cleared the runway and had [ground personnel] check for any leaks or obvious damage. They reported that the plane looked ok.We made another PA that we would taxi back to the gate. We got cleared to the ramp and the FO did the after landing checklist and started the APU. After 1 minute; I called for standard taxi. We shut down the second engine on the ramp while waiting for a gate; made another PA and were towed in. The taxi and landing lights stopped working. Once we were at the gate; we opened the door and the MAIN DOOR OPEN warning message came up. We canceled the aural warning; did the parking checklist and called [Operations] through Dispatch. We made the appropriate AML entries with guidance from [Operations] and waited for local maintenance to come to the plane. The FO did the walk around and we contacted Crew Scheduling and were sent to a hotel.This morning [Operations] informed me that the landing gear control unit was bad and that they replaced it.  All other issues were related to this.Everyone worked together and did a great job to get us back on the ground safely.


Second narrative: [Report narrative contained no additional information.]


Synopsis: EMB-140 flight crew reported returning to departure airport after the landing gear failed to retract.