You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: install.go
    path of file: ./repos/lgo/cmd/install
    
    the code of the file until where you have to start completion: package install

import (
	"bufio"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"os"
	"os/exec"
	"path"
	"strings"
)

type packageInfo struct {
	ImportPath  string
	Name        string
	Imports     []string
	GoFiles     []string
	Standard    bool
	Stale       bool
	StaleReason string
}

// IsStdPkg returns whether the package of
    
func (si *SOInstaller) Install(patterns ...string) error {
	pkgs, err := si.getPackageList(patterns...)
	if err != nil {
		return err
	}
	dry := walker{si: si, dryRun: true}
	for _, pkg := range pkgs {
		dry.walk(pkg.ImportPath)
	}
	w := walker{
		si:          si,
		progressAll: len(dry.visited),
		logger: func(s string) {
			fmt.Fprintln(os.Stderr, s)
		},
		stdout: os.Stdout,
		stderr: os.Stderr,
	}
	ok := true
	for _, pkg := range pkgs {
		if cok := w.walk(pkg.ImportPath); !cok {
			ok = false
		}
	}
	if !ok {
		return errors.New("failed to install .so files")
	}
	return nil
}