ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
24.71k stars 9.62k forks source link

can not compile frontend #8821

Closed shawlq closed 1 year ago

shawlq commented 5 years ago
Apollo version = r3.5.0
REPOSITORY            TAG                                            IMAGE ID            CREATED             SIZE
apolloauto/apollo     dev-x86_64-20181210_1500                       08f1f891e62c        6 months ago        6.82GB

i am going to compile dreamview frontend. when i run "yarn install", it returns an error about " libpng-dev missing". but a newer version libpng12-dev in the docker, that makes "apt-get -f" failed.

how can I install an older version of libpng-dev in docker "apolloauto/apollo:dev-x86_64-20181210_1500" ?

ERRORS like that:

root@in_dev_docker:/apollo/modules/dreamview/frontend# yarn install
yarn install v1.10.1
warning package.json: License should be a valid SPDX license expression
warning dreamview@2.0.0: License should be a valid SPDX license expression
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > react-rangeslider@2.2.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0".
[4/4] Building fresh packages...
[6/8] ⠠ pngquant-bin
[7/8] ⠠ cwebp-bin
[3/8] ⠠ gifsicle
[4/8] ⠠ mozjpeg
error /apollo/modules/dreamview/frontend/node_modules/pngquant-bin: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments: 
Directory: /apollo/modules/dreamview/frontend/node_modules/pngquant-bin
Output:
⚠ connect ETIMEDOUT 151.101.108.133:443
  ⚠ pngquant pre-build test failed
  ℹ compiling from source
  ✔ pngquant pre-build test passed successfully
  ✖ MaxRedirectsError: pngquant failed to build, make sure that libpng-dev is installed
    at ClientRequest.fn.request.res (/apollo/modules/dreamview/frontend/node_modules/pngquant-bin/node_modules/got/index.js:69:23)
    at Object.onceWrapper (events.js:312:19)
    at emitOne (events.js:115:13)
    at ClientRequest.emit (events.js:210:7)
    at HTTPParser.parserOnIncomingClient (_http_client.js:563:21)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
    at Socket.socketOnData (_http_client.js:452:20)

root@in_dev_docker:/apollo/modules/dreamview/frontend# apt-get install libpng-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
libpng12-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@in_dev_docker:/apollo/modules/dreamview/frontend# apt-get install -f libpng-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libpng12-dev' instead of 'libpng-dev'
libpng12-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@in_dev_docker:/apollo/modules/dreamview/frontend# 

root@in_dev_docker:/apollo/modules/dreamview/frontend# apt-cache policy libpng12-dev
libpng12-dev:
  Installed: 1.2.50-1ubuntu2.14.04.3
  Candidate: 1.2.50-1ubuntu2.14.04.3
  Version table:
 *** 1.2.50-1ubuntu2.14.04.3 0
        100 /var/lib/dpkg/status
DongAi commented 4 years ago

According to this error "pngquant failed to build, make sure that libpng-dev is installed", please install libpng-dev and try again

Kailiangdong commented 4 years ago

I have the same question , do you solve?Also install libpng-dev

daohu527 commented 1 year ago

Closed due to inactivity. If the problem persists, pls feel free to reopen it or create a new one and refer to it.