Nếu bạn đã di chuyển một máy ảo Ubuntu hoặc sửa đổi nó và sau đó đột nhiên gặp sự cố khi kết nối mạng để hoạt động, bạn có thể muốn đọc qua trang này, vì tôi đã tìm ra giải pháp để làm cho nó hoạt động trở lại.
Thông báo lỗi đầy đủ là:
eth0: ERROR while getting interface flags: No such device There is already a pid file /var/run/dhclient.eth0.pid with pid 6847440 Internet Systems Consortium DHCP Client V3.0.4 Copyright 2004-2006 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/sw/dhcp/ SIOCSIFADDR: No such device eth0: ERROR while getting interface flags: No such device eth0: ERROR while getting interface flags: No such device Bind socket to interface: No such device Failed to bring up eth0.
sudo vi /etc/network/interfaces
sudo /etc/init.d/networking restart
Bạn sẽ có thể chạy lệnh ping hoặc sử dụng ifconfig -a và mọi thứ sẽ hoạt động.