Filebeat install E: Unable to locate package filebeat

filebeat_einstall

Following Install Filebeat 7.x, I typed these commands in this order-

apt-get install
apt-transport-https
apt update apt install filebeat

But the last command gave me the error shown in picture. I tried sudo rm /var/lib/dpkg/lock but this didnt work because it is a read-only file and showed this error-
rm: cannot remove '/var/lib/dpkg/lock': Read-only file system

1 Like

That sounds like an underlying OS issue @Mehak_Bhargava . Can you touch a simple file in the /var/lib/dpkg directory?

I changed directory to /var/lib/dpkg and opened one of the file but couldnt access its contents. Can You tell how to make sure I am able to touch files in this directory?

Ah ok, if you go to the terminal and cd to that directory

cd /var/lib/dpkg

and then touch the file

touch testfile

If you see a read only error there is probably a bigger problem on the system.

I see a read only error- touch: cannot touch 'testfile': Read-only file system
But I have done installations of ELk before so not sure how now there is a system error. and what is this system error?

I think the file system has an error and has gone read only. It doesn't look like it's related to filebeat. I would try a fresh build of the system if you can do so without losing anything important.

Got it. fresh build in the sense where I delete all the installations made for filebeat or close the terminal and restart the system and restart the installation process?

I think if you are using osboxes, you can just relaunch a new instance?

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - 

echo "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" |    tee -a /etc/apt/sources.list.d/elastic-7.x.list

apt get install apt-transport-https

apt-get update 

apt-get install filebeat

curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.4.0-linux-x86_64.tar.gz
tar xzvf filebeat-7.4.0-linux-x86_64.tar.gz

I used this command instead and filebeat package is downloaded.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.