# Metricbeat package failure (mitchellh/osext not found)

**URL:** <https://discuss.elastic.co/t/metricbeat-package-failure-mitchellh-osext-not-found/352275>\
**Category:** Beats\
**Tags:** docker, metricbeat\
**Created:** [February 1, 2024, 11:12am UTC](https://discuss.elastic.co/t/metricbeat-package-failure-mitchellh-osext-not-found/352275 "2024-02-01T11:12:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![holodomi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/holodomi/32/131321_2.png) [@holodomi](https://discuss.elastic.co/u/holodomi)\
**Post date:** [February 1, 2024, 11:12am UTC](https://discuss.elastic.co/t/metricbeat-package-failure-mitchellh-osext-not-found/352275/1 "2024-02-01T11:12:35Z")

</div>

I am trying to build metricbeat from scratch but am getting hung up on '[https://github.com/mitchellh/osext/](https://github.com/mitchellh/osext/)' apparently not existing anymore.

I am building with:

```sh
$ git clone https://github.com/elastic/beats.git
$ cd beats/metricbeat
$ git checkout v8.12.0
$ make mage
$ mage crossBuild

```

The last step fails with:

```txt
go: github.com/docker/go-plugins-helpers@v0.0.0-20181025120712-1e6269c305b8 requires
	github.com/Microsoft/hcsshim@v0.8.7 requires
	github.com/containerd/containerd@v1.5.7 requires
	github.com/containerd/aufs@v1.0.0 requires
	github.com/containerd/containerd@v1.5.0-beta.3 requires
	github.com/Microsoft/hcsshim/test@v0.0.0-20210227013316-43a75bb4edd3 requires
	github.com/containerd/containerd@v1.5.0-beta.1 requires
	github.com/Microsoft/hcsshim/test@v0.0.0-20201218223536-d3e5debf77da requires
	github.com/docker/distribution@v0.0.0-20190905152932-14b96e55d84c requires
	github.com/mitchellh/osext@v0.0.0-20151018003038-5e2d6d41470f: invalid version: git ls-remote -q origin in /home/dominik/go/pkg/mod/cache/vcs/94ed57c5b21c953d93b47487113db43a5c9b69fd990329ec70dc77348c4dd443: exit status 128:
	remote: Repository not found.
	fatal: repository 'https://github.com/mitchellh/osext/' not found
Error: running "go mod download" failed with exit code 1

```

I was able to work around this problem by setting `GOPROXY=https://proxy.golang.org/cached-only`, but this doesn't seem like a very short-lived solution.

I wanted to create an Issue on [Beats GitHub repo](https://github.com/elastic/beats/) but the issue template pointed me here first.

What should I do to make sure, the builds don't fail in the future?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 29, 2024, 1:13pm UTC](https://discuss.elastic.co/t/metricbeat-package-failure-mitchellh-osext-not-found/352275/2 "2024-02-29T13:13:10Z")

</div>

Closed on February 29, 2024, 1:13pm UTC

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