Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.96k stars 11.35k forks source link

Cannot upgrade lame due to package permissions #12297

Closed gonzofy closed 12 years ago

gonzofy commented 12 years ago

I've had this issue before I believe specifically with lame. Some of the library files and others require root permissions. I cannot upgrade nor remove lame using brew.

Here is the recent attempt:

rob:~$ brew update Updated Homebrew from ea6a9648 to b98bf086. ==> New Formula abyss avidemux checkstyle dwatch glm htop-osx jless libinfinity mpich2 obby pygtkglext scm-manager srecord treecc akka camellia crash gconf gobby ispc jpeginfo mesalib-glw net6 pdf2image readosm ser2net storm xrootd ==> Updated Formula abcde cvs2svn git-flow john midnight-commander play symphony ace daemon git-ftp jp2a minc pngrewrite szl ack daq git-multipush jruby mkvtoolnix polipo tabbed apollo dart git-now jstalk mlton poppler tal app-engine-java-sdk darwinbuild git-sh jsvc mobile-shell postgis task appledoc dash git-url-sub justniffer mongodb povray tbb appswitch dc3dd gitslave jython mongrel2 primesieve tcpurify apt-dater dcal glib kyoto-cabinet monit proj tesseract armadillo ddd glibmm kyoto-tycoon monotone psftools the_silver_searcher arp-scan ddrescue gmap-gsnap lame moreutils pure tiff2png asciidoc dia gmp lasi movgrab putty tig asciitex direnv gmtl latex2rtf mpfr pygtk tkdiff assimp dmenu gnu-arch lcov mpg123 pypy tmap atk dnsmasq gnu-time ldid mpop pyqt tmux atlassian-plugin-sdk dos2unix gnupg ledger msmtp pyqwt todo-txt audiofile drizzle gnuplot ledit mu pyside topgit autoconf dvtm go libagg mupdf python trafficserver autojump dwm go-app-engine-32 libcouchbase mydumper qemu transcode automake eet go-app-engine-64 libdnet mysqlreport qhull ttytter avanor eigen google-app-engine libgaiagraphics mytop qpdf tup bash eina google-js-test libglade nacl qt typespeed bash-completion elasticsearch gource libidn ncmpcpp rabbitmq uchardet bbcp emacs gpsbabel libimobiledevice ndiff rakudo-star unifdef bibutils embryo gptfdisk liblqr neko rasqal unrar bindfs erlang gradle libmikmod newick-utils rc urweb bonnie++ exiftool grads libmpc newlisp rds-command-line-tools usbmuxd boost exim graphviz libmusicbrainz nginx reattach-to-user-namespace uudeview boost-build exodriver grass libogg nmap recode vala bulk_extractor ezlupdate grc libpar2 node redis valgrind c-ares fastjar griffon libplist noweb repo vcftools cabal-install fastri groonga libqglviewer nss roundup vcodex calabash ffmbc growly librasterlite num-utils rrdtool vimpc camlp5 ffmpeg gsoap libraw o-make rsense vmalloc cassandra ffmpeg2theora gtksourceview libspatialite objective-caml rtorrent vtk catdoc fftw gtkwave libtiff ocrad rubinius wait_on ccrypt figlet gwenhywfar libtool octave ruby wbox cd-discid fish help2man libutf open-cobol ruby-build wdfs cdo fmdiff highlight libvirt open-scene-graph saga-core web100clt cdparanoia fontforge hilite libvorbis openimageio sbcl wget cfengine fping hllib libyubikey openssl sbt wine cfitsio freeimage htpdate link-grammar opentracker sc68 wkhtmltopdf cherokee freexl httping llvm osm2pgsql scala wput chuck fsh httrack log4cxx otx scantailor wxmac clam ftjam hub logtalk p7zip sedna x264 clamav fuse4x ice loudmouth pango sigar xapian clay fuse4x-kext ifuse luarocks par2tbb signing-party xclip clhep fwknop imagemagick magit parallel simh xmp clisp gauche imapfilter mairix parmetis sipp xspringies cliweather gdal innotop malbolge pcb snort yara cloc gdk-pixbuf iodine mapnik pdfgrep sonar yarp clojure gearman ioping mathomatic pdflib-lite sound-touch yasm cmake geda-gaf ios-sim maxima peg spatialindex ykclient colordiff gegl ispell mcpp percona-server spatialite-tools ykpers convmv getmail ivy md5sha1sum percona-toolkit sphinx zeromq coreutils gettext jack media-info pgbouncer spidermonkey zint couchdb getxbook jbig2dec mediatomb pgpool-ii sqlite zsh couchdb-lucene gflags jbigkit mercurial phoronix-test-suite squashfs cpansearch ghc jcal metasploit pianobar sshfs cracklib-words ghostscript jenkins metis pipebench stunnel csup git jetty mg pixie subversion ctags git-cola jigdo mhash pkg-config swig ==> Deleted Formula go-gui openttd rob:~$ brew upgrade ==> Upgrading 3 outdated packages, with result: lame 3.99.5, libmikmod 3.2.0b4, tig 1.0 ==> Upgrading lame Error: Permission denied - /usr/local/lib/libmp3lame.dylib rob:~$ brew upgrade lame ==> Upgrading lame Error: Permission denied - /usr/local/lib/libmp3lame.dylib rob:~$

mistydemeo commented 12 years ago

You should do the following:

sudo chown -R $USER /usr/local

This will restore permissions so you should be able to upgrade again.

(You should also try to avoid doing things that will chown libraries in /usr/local to root.)

gonzofy commented 12 years ago

Thanks, mistydemeo. I was nervous to make that broad chown change since I'm not sure what that directory should be. What is the default?

As far as I know, I've done nothing to change the ownership of any files in that directory. Any thoughts as to what might have been done?

mistydemeo commented 12 years ago

If you installed Homebrew via the standard install, then /usr/local will be owned by your user with group-ownership of admin. (You would know if you installed it with other permissions, since you would have had to do a custom install!)

Not sure what could have changed ownership, but if you sudo installed something outside of Homebrew that could have done it. (Homebrew itself will refuse to run with sudo if it's not owned by root.)

gonzofy commented 12 years ago

Yeah, I noticed homebrew would refuse. Makes sense.

No idea what else would have caused those things to be root, but I'll just keep that owned by me going forward.

Thanks for the help!

-Rob

mistydemeo commented 12 years ago

No problem! Is everything working now?

gonzofy commented 12 years ago

Seems to be!

mistydemeo commented 12 years ago

OK, I'll close this issue for now. Feel free to reopen if not everything is fixed.

dissolved commented 11 years ago

I've found all my permissions messed up as well, and best I can guess, this was a result of using Apple's Migration Assistant when moving to a new computer. Can anyone confirm that Migration Assistant is the culprit?

dukejansen commented 10 years ago

Yep, I encountered similar problems after using Migration Assistant.