请求协助获取HP Deskjet 2721e适配联想G50-30(Ubuntu 22.04)的打印/扫描驱动
Hey there, sorry to hear you're stuck trying to get your HP Deskjet 2721e working on your Lenovo G50-30 with Ubuntu 22.04—those failed HP website downloads can be super frustrating. Let's skip the unreliable HP links and use Ubuntu's built-in tools to get this sorted out:
第一步:安装系统自带的HPLIP驱动套件
Ubuntu has official support for most HP printers via the HPLIP package, which includes both printing and scanning functionality. Here's how to set it up:
- Open your terminal (you can press
Ctrl+Alt+Tto launch it quickly) - First, update your system's package list to make sure you get the latest versions:
sudo apt update - Install the full HPLIP suite, including the graphical setup tool:
sudo apt install hplip hplip-gui hplip-data - Once installation finishes, run the setup wizard with:
hp-setup
This tool will automatically detect your printer (whether it's connected via USB or wireless on the same network) and walk you through configuring both printing and scanning.
第二步:手动添加打印机(如果自动检测失败)
If the HPLIP wizard doesn't pick up your printer, you can add it through Ubuntu's system settings:
- Open Settings > Printers and click the Add Printer button
- Look for your HP Deskjet 2721e in the list—USB-connected printers should show up immediately; for wireless, double-check your printer is on the same Wi-Fi network as your laptop
- If the exact driver isn't listed, select Choose from database, then search for the "Deskjet 2700 Series" (drivers from the same product line usually work perfectly for specific models like the 2721e)
第三步:确保扫描功能正常
Scanning sometimes needs extra packages to work properly. Let's make sure those are installed:
- Run this command in terminal to install scanning tools:
sudo apt install sane sane-utils xsane - Test if your scanner is detected with:
scanimage -L
If this command lists your HP Deskjet 2721e, you're good to go—you can use the Xsane app or Ubuntu's built-in "Document Scanner" to start scanning.
第四步:修复权限问题(如果设备访问被拒绝)
Occasionally, your user account might not have the right permissions to access the printer/scanner. Fix this by adding yourself to the relevant groups:
- Run these two commands:
sudo usermod -aG lp $USERsudo usermod -aG scanner $USER - Log out of your account and log back in for the permissions to take effect.
If you still run into issues, feel free to share the output of any error messages you get from the terminal commands—those details will help pinpoint exactly what's going wrong.
备注:内容来源于stack exchange,提问作者Xavier Prévost

